Closed
Bug 82573
Opened 24 years ago
Closed 24 years ago
Postscript margins are being applied 2 times
Categories
(Core :: Printing: Output, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.3
People
(Reporter: dcone, Assigned: dcone)
References
Details
Attachments
(4 files)
2.37 KB,
patch
|
Details | Diff | Splinter Review | |
2.37 KB,
patch
|
Details | Diff | Splinter Review | |
6.53 KB,
patch
|
Details | Diff | Splinter Review | |
668 bytes,
patch
|
Details | Diff | Splinter Review |
Margins for printing are being applied in the reflow,and also in the Postscript output.
Assignee | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
I think you have a typo here: mPrintSetup->top = (int) 0); (extra right-paren?) sr=attinasi otherwise.
Assignee | ||
Comment 3•24 years ago
|
||
Assignee | ||
Comment 4•24 years ago
|
||
basically.. I have the file on linux.. copied manually to windows for the patch file.. so I made a typo. This patch does fix the bug.
Comment 5•24 years ago
|
||
r=kmcclusk@netscape.com
Comment 6•24 years ago
|
||
I applied this patch to my MOZILLA_0_9_BRANCH build. The left and top margins look ok. The right and bottom margins are worse after the patch. I also recommend that the header and footer follow the set margins. With this patch the header/footer are pushed to close to the left edge of the page. I was using margins setting (top/bottom = 0.50, left/right = 0.25)
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.3
Comment 7•24 years ago
|
||
Can anyone please point me to the source where reflow appiles the margins ? Thanks !
Assignee | ||
Comment 8•24 years ago
|
||
the margins are applied to the reflow size.. and passed to reflow.. this is in nsDocumentViewer.cpp
Assignee | ||
Comment 9•24 years ago
|
||
I looked at this using GhostView.. and measured the document size.. and margins. What I found.. was for the mozilla page. the left margin looks great.. the right looks to wide.. but the width of the document ended up to be ~7.5 inches.. which is what its supposed to be (for margins of .5 all the way around). I cant currently print on my linux box, but using ghostscript it looks good if I measure the sizes. I have looked at all the code.. and its spitting out the correct sizes for layout. I figure 8.5 inches without margins. 8.5 - (.5+.5) = 7.5 inches wide. What are you seeing Michael.
Comment 10•24 years ago
|
||
Don, here are my results using MOZILLA_090 with the above patch applied built on a Linux box. Web page: www.cnn.com Selected margins: 0.5 inches all the way around. Printing to: Postscript file Viewed using: GSview(windows) and Ghostview (Linux) Results: Top margin: 0.5 inches Left margin: 0.5 inches Right margin: 1.5 inches Bottom margin: 1.5 inches Width of the document (main body) ended up to be ~6.5 inches. The top and left margins look good.
Assignee | ||
Comment 11•24 years ago
|
||
How did you measure the width of the document, I used a ruler. Also.. does ghost view represent the page (right side) accuratly. I am at a loss, because looking at the code.. its doing exactly what it should be, and my results using ghostview are correct. The right margin looks big.. but the body and left margin are correct so I assumed Ghostview just did not represent the page correctly. Can you print this out and see what your results are.
Comment 12•24 years ago
|
||
I measured them using the pointer position data that is displayed by GSView. I printed the Postscript file on 2 different printers, HP DeskJet 932C and HP LaserJet 8000. The results are the same. I used a ruler to measure the margins and width of the body. I still get the same results: Top margin: 0.5 inches Left margin: 0.5 inches Right margin: 1.5 inches Bottom margin: 1.5 inches Width of the document (main body) ended up to be ~6.5 inches. Have you tried this on your Linux build. It may be another one of those Linux quirks, like in bug#82624.
Assignee | ||
Comment 13•24 years ago
|
||
I did all my testing on linux, since the PostScript for Windows is automatically generated.. and would not be effected by these changes.
Comment 14•24 years ago
|
||
Michael Wright: Could you grab http://bugzilla.mozilla.org/showattachment.cgi?attach_id=36446 and check whether you see the same problem there, please ? The output is from Xprint module (+Xprt PS DDX) - which should (in theory :-) not suffer from this issue when the bug sits in native PostScript module. If the bug is in this output, too - then the bug sits in the code shared between all print systems (Win32/PostScript/Xprint)...
Comment 15•24 years ago
|
||
Roland, I had problems viewing this Postscript file using GSView (Win98) (got Document Structuring Conventions (DSC) errors about %%BoundingBox) I was able to view from Ghostview on Linux. The document looked ok. What were your margins?
Comment 16•24 years ago
|
||
I used the default setting for margins (0.5/0.5/0.5/0.5 AFAIK).
If the margins are correct in that output - then the issue may be in the native
PostScript module...
----
> I had problems viewing this Postscript file using GSView (Win98) (got
> Document Structuring Conventions (DSC) errors about %%BoundingBox)
Could you please email me details about that ? This may be a bug in the PS DDX
(driver) of Xprt (or GSView is buggy... :-) ...
Assignee | ||
Comment 17•24 years ago
|
||
Assignee | ||
Comment 18•24 years ago
|
||
OK.. new patch to keep the margins in line. The bottom line here was the margins are being applied to the page size in the nsSimplePageSequencer. They were also added in the nsPostScriptObj object and added into the page size in the nsDeviceContextPS::GetDeviceSurfaceDimensions() call. This patch takes the margin calculation out of the last 2 calls and only the nsSimplePageSequencer will use them for layin out the image. Also in the patch is some code with defines so that the PS code can be compiled and debugged on windows, but very few lines are for that.
Comment 19•24 years ago
|
||
Looks OK to me - sr=attinasi
Comment 20•24 years ago
|
||
If the code is only for testing, shouldn't it be in #ifdef DEBUG's? otherwise, r=peterl
Assignee | ||
Comment 21•24 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 22•24 years ago
|
||
Michael/Roland, can you please see if this is fixed with latest build? and mark this bug VERIFIED-FIXED if it is.... thanks.
Comment 23•24 years ago
|
||
I did a few test on this fix. Here are the results: - Tested on nightly build 7/16 - Linux OS. Test cases used URL: http://www.mozilla.org/projects/. Also only tested using Letter size paper. Test case 1: Print above URL with margins set to 0.5" Results: Margins are correct for main body. Test case 2: Print above URL with margins set to 0.25" Results: Left and top margins are correct for main body. Right and bottom margins are not correct. They measured ~0.75" each. Test case 3: Print above URL with margins set to 0.75" Results: Left and top margins are correct for main body. Right and bottom margins are not correct. They measured ~0.25" each. **NOTE: in all 3 test cases the header and footer are not printed correctly anymore. The margins for the header and footer look to be 0.0", which most printers cannot print. May need to open another bug of this. It does not look to be fixed unless you are using 0.5" margins.
Comment 24•24 years ago
|
||
REOPENING based on Michael's comments.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 25•24 years ago
|
||
Comment 26•24 years ago
|
||
looks fine, r=peterl on new patch
Comment 27•24 years ago
|
||
sr=attinasi
Comment 28•24 years ago
|
||
I did a quick test with this latest patch and the margins look correct.
![]() |
||
Comment 29•24 years ago
|
||
do they look correct for the header as well? If so, is bug 91321 a duplicate of this one?
Comment 30•24 years ago
|
||
The margins are incorrect for the header and footer. That is why I opened bug 91321.
Assignee | ||
Comment 31•24 years ago
|
||
Margins are fixed.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment 32•24 years ago
|
||
Michael, if you can verify the fix....please mark verified-fixed or REOPEN. thanks.
Comment 33•24 years ago
|
||
Tested on nightly build 7/19 - Linux OS. Test cases used URL: http://www.mozilla.org/projects/ Tested Letter, Legal, and A4 paper size Test case 1: Print above URL with margins set to 0.5" Results: Margins are correct for main body. Test case 2: Print above URL with margins set to 0.25" Results: Margins are correct for main body. Test case 3: Print above URL with margins set to 0.75" Results: Margins are correct for main body. verified-fixed (I do not have permissions to change status to verified)
Comment 34•23 years ago
|
||
roland/michael please verify and mark verified when you get chance
Comment 35•23 years ago
|
||
marking verified per Michael's comments...thanks!
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•