View Issue Details

IDProjectCategoryView StatusLast Update
0008336ScribusPrintingpublic2016-05-29 08:22
ReporterRoy Leith Assigned To 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status newResolutionopen 
PlatformLinuxOSKubuntuOS Version 9.04 X64
Product Version1.3.5svn 
Summary0008336: Print Offset when printing in Landscape
DescriptionWhen attempting to print an A4 landscape document, the page is printed with an offset of about 30mm both down and to the right. The main page display and the print preview both show the document correctly placed on the page.

As far as I can tell, the printed dimensions are correct for an A4 page.

I am using a Hewlet Packard CP3505 Laserjet printer, but have had similar problems with an HP Deskjet 5550.
Steps To ReproduceI have created several new documents in landscape ensuring the margins are set to those of the printer and always get the same problem. I have checked the printer properties and the document properties several times.
TagsNo tags attached.
Patch

Relationships

has duplicate 0008845 closedjghali Landscape printing scaled/oriented wrong 
has duplicate 0009915 closedjghali Printing marks (crop, bleed) and the content are not correctly aligned on the page 
related to 0008254 assignedfschmid Page becomes rotated 90 degrees clockwise when printing to postscript level 3 

Activities

2009-08-12 17:51

 

TestDocument.sla (12,513 bytes)

stewschneider

2010-03-13 23:23

reporter   ~0023505

I'm having the same issue with Ubuntu 9.10 and HP printers in general. Specifically, we saw it with an HP 6500 wireless MFD and a Colorlaser 2605dn.

gazzatav

2010-03-18 21:45

reporter   ~0023546

I have reproduced a note below that I made quite a while ago as I think this is the same issue. I think that what the printer may do is irrelevant because the behaviour is undefined. Scribus is trying to send long edge feed to a short edge feed printer. Maybe HP printers take the ps/DSC literally while others try to work out what is actually meant. So test the PS not the printer (save a lot of paper too!) :)

Try some experiments please:
1. Create a landscape doc in Scribus, print to ps and re-import it. Has it rotated?
2. View the same ps file in evince, does it look weird? - and how about print preview there.
3. Create a landscape doc in Scribus and OpenOffice.org and print to ps. Compare the %%HiResBoundingBox and %%BoundingBox numbers in the ps file. Are they reversed?

I find the OO.org file prints and views perfectly. (I'm using Scribus 1.3.6svn on Ubuntu 9.10).

I believe this happens because the Scribus postscript output is incorrect. The Postscript Printer Definition File Format Specification states:

  Width—This indicates the width of the page perpendicular to the direction
  of media feed, in PostScript default units.

  Height— This indicates the height of the page parallel to the direction of
  media feed, in PostScript default units.

The postscript file being generated by Scribus for landscape 'redefines' A4 etc as a long edge feed (A4Rotated). Because most printers are short edge feed the %%PageOrientation: Landscape comment turns the page back to portrait. The fix is simple, produce a PS file and edit %%HiResBoundingBox, %%BoundingBox, %%PageBoundingBox and %%PageCropBox so that for each the last two numbers are swapped. Then after %%Page 1 1 and save put 90 rotate 0 595 neg translate. It is tedious but works. You have a ps file which displays and prints correctly.

A4 is defined by ISO and JIS as 595 x 842 as stated by Adobe on page 191 of the Postscript Printer Definition File Format Specification.

stewschneider

2010-03-18 21:58

reporter   ~0023547

Following gazzatav's suggestion, I opened a Landscape .sla document, printed to file, and viewed the file with evince and by importing. Both were perfect, as was print preview. Ubuntu 9.10, but no printer now, 'cause I hadda give it to the church so they could print bulletins in Ooo.org. Paper size was legal.

gazzatav

2010-03-18 22:51

reporter   ~0023548

Thanks stewschneider. Did you check the %%PageBoundingBox numbers, can you compare with PS from OO.org, do you have a long edge feed printer?

Maybe this only happens with A4.

stewschneider

2010-03-18 23:09

reporter   ~0023549

The terms %%PageBoundingBox et al. are new to me, but I googled around a bit and I think I got what you need. If not, tell me how, and I'll get right on it:

stewart@Lenny:~$ gs -sDEVICE=bbox -dNOPAUSE -dBATCH ./Desktop/Bulletin_March_14_2010.ps
GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
%%BoundingBox: 510 105 964 571
%%HiResBoundingBox: 510.083703 105.494973 963.664213 570.009076
%%BoundingBox: 40 86 964 570
%%HiResBoundingBox: 40.061319 86.280044 963.144322 569.009092
stewart@Lenny:~$ gs -sDEVICE=bbox -dNOPAUSE -dBATCH ./Desktop/Bulletin_March_14_OOo.ps
GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
%%BoundingBox: 59 57 69 127
%%HiResBoundingBox: 59.561998 57.077998 68.075998 126.647996
%%BoundingBox: 59 57 69 551
%%HiResBoundingBox: 59.561998 57.077998 68.075998 550.241983

gazzatav

2010-03-19 17:20

reporter   ~0023551

Well that is strange. Did you just open the postscript file in gedit and get the first few lines? When I make a landscape legal document and output to PS I get this:

%!PS-Adobe-3.0
%%For:
%%Title:
%%Creator: Scribus1.3.6.svn
%%Pages: 1
%%BoundingBox: 0 0 1008 612
%%HiResBoundingBox: 0 0 1008 612
%%LanguageLevel: 3
%%EndComments
%%BeginProlog

The bounding box numbers are completely different from yours and the thumbnail in my home folder is portrait. When I view it in evince I get what you can see in the uploaded file, legal-landscape2.

gazzatav

2010-03-19 17:21

reporter  

legal-landscape2.png (67,717 bytes)   
legal-landscape2.png (67,717 bytes)   

stewschneider

2010-03-19 18:22

reporter   ~0023552

OK..since we're dealing in an area in which I'm lost, and so am not certain what variables affect what, here's what I just did:
I created a document called TestScribus containing two text boxes on landscape legal paper. Each text box contained ipsum lorem (actually, Bram Stoker, but you get my meaning). I exported to eps, viz.:
%!PS-Adobe-3.0 EPSF-3.0
%%For:
%%Title:
%%Creator: Scribus1.3.3.13svn
%%Pages: 1
%%BoundingBox: 578 41 970 572
%%HiResBoundingBox: 577.5 40.5 969.5 571.5
%%DocumentCustomColors: %%DocumentCustomColors: %%CMYKCustomColor: %%CMYKCustomColor: %%LanguageLevel: 3
%%EndComments
%%BeginProlog
/Scribusdict 100 dict def

I then created a document, legal landscape, in OpenOffice 3.1 containing two columns filled with the same sort of Bram Stoker ipsum lorem.

%!PS-Adobe-3.0
%%BoundingBox: (atend)
%%Creator: (OpenOffice.org 3.1)
%%For: (stewart)
%%CreationDate: (Fri Mar 19 14:16:58 2010)
%%Title: (Untitled1)
%%LanguageLevel: 3
%%DocumentData: Clean7Bit
%%Pages: (atend)
%%Orientation: (atend)
%%PageOrder: Ascend
%%EndComments
%%BeginProlog
%%BeginResource: procset PSPrint-Prolog 1.0 0

Both were formatted for an HP 2605dn ColorLaserJet, which is a short-edge feeder. Is that helpful?

gazzatav

2010-03-19 20:37

reporter   ~0023554

No stewschneider, this is a printing problem. What you need to try is:
Create your landscape doc, then go to print but change the printer to 'file' and when you print this will create a postscript file which you can examine in gedit and evince.

stewschneider

2010-03-19 21:24

reporter   ~0023555

Printing to a file, I get:
%!PS-Adobe-3.0
%%For:
%%Title:
%%Creator: Scribus1.3.3.13svn
%%Pages: 1
%%BoundingBox: 0 0 1008 612
%%HiResBoundingBox: 0 0 1008 612
%%DocumentCustomColors: %%DocumentCustomColors: %%CMYKCustomColor: %%CMYKCustomColor: %%LanguageLevel: 3
%%EndComments
%%BeginProlog
/Scribusdict 100 dict def

gazzatav

2010-03-19 21:56

reporter   ~0023556

That's the same bounding box as mine (0 0 1008 612). If you open that file in evince does it appear as portrait or landscape?

stewschneider

2010-03-19 21:58

reporter   ~0023557

Landscape. I'm busily installing a new printer so we can see what output we get.

gazzatav

2010-03-19 22:06

reporter   ~0023559

That's really weird, would you mind uploading the file so that I can test it on mine.

stewschneider

2010-03-19 22:37

reporter  

Scan 100780000.jpg (1,040,095 bytes)   
Scan 100780000.jpg (1,040,095 bytes)   

stewschneider

2010-03-19 22:40

reporter  

Document-1.sla (51,978 bytes)

stewschneider

2010-03-19 22:41

reporter   ~0023562

OK..I uploaded both the .sla file and the resulting printer output. I hope. (I was also installing a printer on a MacBook, and I'm old and feeble minded)

stewschneider

2010-03-19 22:47

reporter   ~0023563

Limiting myself to just the one computer (instead of trying to work on both simultaneously) I am able to print properly oriented (Landscape), but we get only 80% of one text box, nothing from the other and two blank sheets.

gazzatav

2010-03-20 00:09

reporter   ~0023565

I have uploaded the file BramStoker.ps. It is the postscript file which I made from your Document-1.sla (Scribus made a font substitution). I edited the file according to my instructions above. On my system it displays perfectly, I would be interested to know how it looks in evince on yours and whether it prints correctly from evince.

gazzatav

2010-03-20 00:10

reporter  

BramStoker.ps (450,686 bytes)

stewschneider

2010-03-20 00:42

reporter  

FileDiffs.ods (13,635 bytes)

stewschneider

2010-03-20 00:43

reporter   ~0023566

I'm still out of my depth here, but it's clear to me that the co-ordinates are being reversed. See uploaded spreadsheet.

stewschneider

2010-03-20 00:43

reporter   ~0023567

Oh, and as I noted, it ejects an extra sheet of paper.

gazzatav

2010-03-20 01:47

reporter   ~0023568

Yes, I edited it and reversed the coordinates as in my original note above. Don't worry about being out of your depth, I was totally ignorant about this stuff a couple of months ago and now I'm just a little bit less than totally ignorant.
But how does my edited document display in your version of evince? In mine it displays perfectly but I'm using Ubuntu 9.10 on a PC. These problems with landscape printing seem to be common but when they get raised they get marked as duplicates of other problems - perhaps they are not! I only came to this issue because I was told that what I reported was a duplicate of this. It doesn't look like it is though.
How big is the offset you get when you print the original document? Is it 30mm right and down as Roy Leith described?

stewschneider

2010-03-20 02:36

reporter  

Document-1.pnm (559,835 bytes)   
Document-1.pnm (559,835 bytes)   

stewschneider

2010-03-20 02:38

reporter   ~0023569

Your BramStoker.ps looked fine in Evince, and printed fine, except for kicking out an extra sheet of paper. I printed Document-1.sla to a .ps file and printed it. As you can see from the scan, it is printed Portrait, on the lower half of the legal sized sheet. Sorry I can't be more precise -- I don't have a ruler here!

Secondarily, if I print directly from Scribus, I get the garbled up mess I sent before.

stewschneider

2010-03-20 02:43

reporter   ~0023570

I wish I had a legal sized scanner, to make this clearer, but I sent two scans -- hope you can piece them together to note that yes, printing DIRECTLY FROM SCRIBUS, the text is offset down and to the right.

stewschneider

2010-03-20 02:44

reporter  

GarbledMessPrintedfromScribus.pnm (559,835 bytes)   
GarbledMessPrintedfromScribus.pnm (559,835 bytes)   

stewschneider

2010-03-20 02:44

reporter  

gazzatav

2010-03-20 22:01

reporter   ~0023577

I am so pleased the BramStoker.ps printed fine, I trust the extra sheet was blank so you can use it again. I'm not sure why it did that, like I said, I'm not an expert by any means.

That means that my problem, which is one of rotation, and yours, which is one of translation, are both cured by exactly the same change to the code that goes to the printer. You can actually send that BramStoker.ps file directly to the printer on the command line using a command something like
$BramStoker.ps >lpr (from the same directory). What we have done is intercept the file going to the printer, corrected it and sent it on.

So how do I get the DEVELOPERS to take my theory seriously?

Here it is again below and if you want me to take you through what I did with the postscript file I'd be happy to. The postscript is what gets sent to the printer by Scribus when you tell it to print to the printer.

My belief/theory is that Scribus is sending a page to the printer which the printer interprets as being bigger than it can handle - so anything can happen. I believe this because Adobe, who set the postscript standard, define A4, LEGAL, LETTER etc. always as a PORTRAIT size in the DSC (those things with %% in front). For a landscape doc you simply tell the printer the page is landscape in the PS.

What Scribus is doing is defining a page size which looks to a human like landscape but to the printer it is a portrait page which happens to be wider than it is high. But most printers are short edge feed so the printer is already having a problem trying to work out what to do with a piece of paper too wide for it to handle. Then to make matters worse the printer is told to print landscape on a piece of paper it can't handle so anyone with a printer that reads PS level 3 properly gets a mess!

stewschneider

2010-03-21 02:41

reporter   ~0023578

OK...this is a lot for an elderly pastor to get his mind wrapped around, and it's awfully hard to see from the scans I sent (as I don't have a legal sized scanner), but I think we actually have three outcomes:
1. BramStoker.ps -- prints correctly
2. Document-1.ps -- attempts to print portrait. diff shows LOTS of differences, but the ones of significance seem to be the reversal of 612 and 1008
3. Document-1 printed from Scribus -- Landscape printing offset down and to the right.

gazzatav

2010-03-21 03:11

reporter   ~0023579

You mean document-1.sla I think. I can't see any document-1.ps. Don't worry about the scans, it's enough to say that it prints incorrectly in different ways on different systems.

The important thing here is that the SAME CHANGE to what the printer gets ie the PS file, makes it right on TWO DIFFERENT SYSTEMS with different printing problems. There's got to be something in that.

stewschneider

2010-03-21 17:00

reporter   ~0023589

One thing I'm not clear on, gazzatav, is why the misprint is different when we trigger print from Scribus and when we print a .ps file Scribus has created. If Scribus creates the .ps file and we're intercepting it, shouldn't the mis-print be the same in both cases? In 0000002 above, we get portrait printing. In 0000003, we get offset landscape printing.

gazzatav

2010-03-21 17:48

reporter   ~0023590

I'm not following you there, those links go to a different issue. Could you upload your document-1.ps, I haven't seen it yet and I'm not sure whether it is level 2 postscript or level 3.

On the specific point you raised about the differences, and with my limited knowledge, it is only a guess but it is possible that as the postscript is sent to the printer 'live', the printer replies to the print manager that it can't handle the file so there could be some renegotiation and a slight (or big) change to the file to enable it to print. That would relate back to my earlier comment that the behaviour is undefined and different printers (and their drivers) will cope in different ways.

stewschneider

2010-03-21 19:08

reporter  

Document-1.ps (357,976 bytes)

stewschneider

2010-03-21 19:11

reporter   ~0023591

The "links" were my goof. I was trying to refer to my previous note. What I should have written would be "In Number Two (Document-1.ps) we get portrain printing. In Number Three (Document-1 printed from Scribus) we get offset landscape printing".

This software apparently added the links. I've uploaded Document-1.ps.

Whew! Hope that is clearer!

Issue History

Date Modified Username Field Change
2009-08-12 17:51 Roy Leith New Issue
2009-08-12 17:51 Roy Leith File Added: TestDocument.sla
2010-02-18 23:53 jghali Relationship added has duplicate 0008845
2010-03-13 23:23 stewschneider Note Added: 0023505
2010-03-18 21:45 gazzatav Note Added: 0023546
2010-03-18 21:58 stewschneider Note Added: 0023547
2010-03-18 22:51 gazzatav Note Added: 0023548
2010-03-18 23:09 stewschneider Note Added: 0023549
2010-03-19 17:20 gazzatav Note Added: 0023551
2010-03-19 17:21 gazzatav File Added: legal-landscape2.png
2010-03-19 18:22 stewschneider Note Added: 0023552
2010-03-19 20:37 gazzatav Note Added: 0023554
2010-03-19 21:24 stewschneider Note Added: 0023555
2010-03-19 21:56 gazzatav Note Added: 0023556
2010-03-19 21:58 stewschneider Note Added: 0023557
2010-03-19 22:06 gazzatav Note Added: 0023559
2010-03-19 22:37 stewschneider File Added: Scan 100780000.jpg
2010-03-19 22:40 stewschneider File Added: Document-1.sla
2010-03-19 22:41 stewschneider Note Added: 0023562
2010-03-19 22:47 stewschneider Note Added: 0023563
2010-03-20 00:09 gazzatav Note Added: 0023565
2010-03-20 00:10 gazzatav File Added: BramStoker.ps
2010-03-20 00:42 stewschneider File Added: FileDiffs.ods
2010-03-20 00:43 stewschneider Note Added: 0023566
2010-03-20 00:43 stewschneider Note Added: 0023567
2010-03-20 01:47 gazzatav Note Added: 0023568
2010-03-20 02:36 stewschneider File Added: Document-1.pnm
2010-03-20 02:38 stewschneider Note Added: 0023569
2010-03-20 02:43 stewschneider Note Added: 0023570
2010-03-20 02:44 stewschneider File Added: GarbledMessPrintedfromScribus.pnm
2010-03-20 02:44 stewschneider File Added: GarbledMess2PrintedfromScribus.pnm
2010-03-20 22:01 gazzatav Note Added: 0023577
2010-03-21 02:41 stewschneider Note Added: 0023578
2010-03-21 03:11 gazzatav Note Added: 0023579
2010-03-21 17:00 stewschneider Note Added: 0023589
2010-03-21 17:48 gazzatav Note Added: 0023590
2010-03-21 19:08 stewschneider File Added: Document-1.ps
2010-03-21 19:11 stewschneider Note Added: 0023591
2011-04-09 13:33 jghali Relationship added has duplicate 0009915
2016-05-29 08:22 Kunda Relationship added related to 0008254