Paper size or orientation are not used when printing

Bug #166678 reported by Thecrimson
112
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Unassigned
Nominated for 0.46.x by Sebastian Hoering
Nominated for Old by Sebastian Hoering
inkscape (Debian)
Fix Released
Unknown

Bug Description

I tried to print a A4 landscape svg on an EPSON Stylus
C84 printer. The result was a portrait printout so I
had only the left 2/3 of the graphic on a not rotated page.

Tags: printing
Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Can you reproduce this by printing to file? Or saving as PS?
What are exact steps? Can you attach the file?

Revision history for this message
Thecrimson (thecrimson) wrote :

I tryed to print to file but for some reason my machine
froze. Maybe because the printer is not connected with this
computer but to another one in the network.
When saving as PS the result is just fine, as it is when
exporting as PNG. Using pdfcreator didn't work because the
Windows Print Fool blows up the size of the object to be
printed to 469 MB. This simply takes my machine down :)
Judging from past experience I'd guess this is not a problem
of inkscape's but a Window's one.

The SVG file is attached, now. I zipped it to decrease size.

Revision history for this message
Jflemaire (jflemaire) wrote :

I can confirm this with the file provided and indeed
with /File/New/A4_landscape in Inkscape. Current CVS under
Linux. Using "| kprinter" as printing command, and then selecting
"Landscape" in KPrinter, the output is in portrait. Doing
"> prints.ps" and then printing the file with KPrinter the output is in
landscape.

Revision history for this message
Bug Importer (bug-importer) wrote :

exported EPS from a landscape inkscape document contains
"%%Orientation: Portrait" string.

====
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: inkscape 0.43+devel
%%Pages: 1
%%Orientation: Portrait
%%BoundingBox: 0 0 482 171
== cut ==
inkscape document type is landscape!

Revision history for this message
Zeimusu-users (zeimusu-users) wrote :

Originator: NO

This issue isn't KPrinter specific. Could the summary line be changed to
something like:
"Paper size or orientation are not used when printing" to avoid duplicate
reports.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

Please test with latest Inkscape SVN Head. We've redone how printing works and (aside from bug 178776) it should solve these issues now.

Changed in inkscape:
status: Confirmed → Incomplete
Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I can confirm this problem using Rev17047.
I'm using an epson stylus color 580 printer with the default driver in Ubuntu Gutsy Gibbon and the print output doesn't take account of the page orientation. It's not a printer problem since I'm able to print correctly from any other program.
I'm not sure but I'd say that it doesn't use the correct page size. When printing A4 it eats approximately 8 cm of top margin (I have to move the design 8 cm lower to get it correctly printed). I've always thought that was a margins problem, but maybe it's using letter size and doesn't use the page size set in the printer dialog.

Changed in inkscape:
status: Incomplete → Confirmed
Revision history for this message
appultaart (appultaart) wrote :

On a I can confirm this problem using Inkscape 0.46_0 (Ubuntu gutsy repositories; Brother 5250-DL laserprinter (CUPS)).
A landscape-set document prints in portrait mode. I am not able to change to "portrait/landscape" in the printer dialog menu (option is greyed out).

A .pdf file of this document will print in portrait mode when opened with Adobe-PDF-viewer (properties indicate "portrait"). When this same .pdf-document is opened in Evince, it prints landscape (properties indicate "landscape").
A .ps-file of this document (printing from Evince) -> prints in landscape, but a .ps-file "generated with Cairo" prints portrait.
Inconsistent?
This can be a printer-settings issue, but I observed this only now with Inkscape documents just after installing 0.46 (but, frankly, I do not work often on landscape-sized paper and might have missed this issue). [and, it is a minor issue to me]

Revision history for this message
Tony Rowan (inkscape-bug) wrote :

When I try to print a large document other than A4 on the HP DesignJet T610 inkjet, it always prints just an A4 section. This worked on the previous version.

Revision history for this message
wolfgang (wolfhai-gmx) wrote :

I can confirm that inkscape 0.46 does not print with a HP LJ 1100 in Landscape mode.

Revision history for this message
leowrld (letelu369) wrote :

For me inkscape 0.46 don't have the possibility to change portrait/landscape and it's not in relations with the printer type. In my system slackware 12.1 the other software printing in every format without a problem.

Revision history for this message
studioa (principal-studioa) wrote :

I'm using 0.46 and yes, printing on other size than A4, it prints just a part of A4 without any graphics.
I have an A3 landscape oriented and when trying to print via PDFCreator, it just print an A4 without anything inside.
So it is a big-bug. (working on windoze vista)

Revision history for this message
David Bond (david-davidbond) wrote :

This bug makes Inkscape utterly unusable for working in Landscape mode. The document cannot be printed without first rotating the entire image around, printing and then undoing the rotate.

Is there any way to get the priority raised, or should I go back to a previous version?

Revision history for this message
Alvin Penner (apenner) wrote :

could you submit a sample .svg file that you would like to print, and the size of the output?

Revision history for this message
oroman (ahmed-a-m89) wrote :

I can also confirm this bug while using it in Ubuntu 8.04. Have to save to PDF and then print with a PDF reader to get it to work properly, and then strokes don't look like they do in Inkscape, due to some other bug. Forces user to have to go through and change all the strokes.

To reproduce just create any landscape drawing and print. It will not print as landscape no matter what you do.

Thanks to this I'm never touching Inkscape again. Way too many bugs.

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

> Thanks to this I'm never touching Inkscape again. Way too many bugs.

That wasn't very polite.
There are people working on inkscape in their free time and you're demanding them to fix all the bugs, otherwise you won't use inkscape again?
Being rude won't make bugs fixed faster.

Back to the topic. I confirm this bug, the other behavior I described in january is fixed, but landscape printing still doesn't work. I'd raise the importance of this bug. It's not critical (there's an easy workaround: rotate the design on a portrait page) but it isn't low priority either. The unexpected output wastes ink and paper.

Changed in inkscape:
importance: Low → Medium
Revision history for this message
Arno Teigseth (arno-teigseth) wrote :

I can confirm this bug in ubuntu 8.04, inkscape version 0.46

We have a Sharp MX4501 in our office and it's loaded with both A4 and A3 in different input trays. Trying to print an image of A3 size it will print about 1/2 of the drawing on an A4 sheet, and then spit out an empty A4 afterwards...

Workaround for now: Administration | Printing and set the paper size in Printer options, and rotation in Job Options.

Then print from inkscape. Bob's very much my uncle with full-size A3 color print :)

Now, inkscape probably should have a "Page setup" menu item in the file menu, as other applications do have (like Firefox). Then this would be much easier (No need to go to Administration | Printing). I don't know why the Page setup is a separate entry and not included in the CUPS print dialog, but that's another discussion.

Revision history for this message
raboof (arnouten) wrote :

I can confirm this bug, too.

For me changing the orientation in system-config-printer under 'job options'/'orientation' (either on the client or on the printer server) doesn't help. (fwiw, this is on a HP officejet 5610 all-in-one).

Thanks for raising the importance: though it might seem like a trivial problem, it looks very embarrassing/unprofessional. Also, the workaround (unless I'm missing something) means you have to rotate the content, change the page orientation and align them properly in 3 separate steps. Quite a hassle, especially if you want to undo the changes after printing.

Revision history for this message
raboof (arnouten) wrote :

An easier workaround by printing from the commandline using imagemagick:

  convert -density 200 -resize 80% -rotate 90 mysvg.svg ps:- | lpr

the '-density' is needed to get a good resolution, the '-resize' is needed because convert just assumes 1px=1point, but svg uses 80 pixels-per-inch and ps uses 72 points-per-inch.

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

I suspect the problem is in the following code in ui/dialog/print.cpp draw_page():

        cairo_t *cr = gtk_print_context_get_cairo_context (context);
        cairo_surface_t *surface = cairo_get_target(cr);

then further down:

        bool ret = ctx->setSurfaceTarget (surface, true);

GTK print rotates the cairo context when landscape is selected in the print dialog. If you use the context from gtk_print_context_get_cairo_context() to draw on it should just work. The problem is the surface if obtained from the context and passed to the cairo renderer. Cairo surfaces do not store a transformation matrix. This is only in the context. So the above code is ignoring the CTM set by GTK print.

The fix would be to either pass the context to the cairo renderer instead of the surface or get the CTM from the context ( cairo_get_matrix() ) and pass the CTM matrix along with the surface to the cairo renderer. In the cairo renderer after calling cairo_create(), call cairo_set_matrix() to apply the GTK print CTM to the context.

Also, the Win32 hack can be removed from that function as the current Gtk+ in the Win32 builds is using the win32 printing surface.

Revision history for this message
Lisa Barr (lisa-softplc) wrote :

The 1st report of this bug was 7/2005 and it is now March of 2009 and this still hasn't been fixed.

In document properties I chose Letter size, landscape orientation. I have an HP Laserjet 4050TN, and the properties in it are Letter size (8.5 x 11") Portrait orientation (this is the default)

On every other program, the program overrides the default for the printer and changes the orientation, but not on Inkscape.

I can attach a document if you would like.

The only work around I can find is...
when one selects print, and the print dialog box comes up, there are tabs at the top. Choose Paper, then choose landscape. This will print a landscape page.

AND IT DOESN'T change the defaults for the printer. The defaults revert back to Portrait after printing.

Any idea when this bug will be fixed. 3.5 years seem to be plenty of time.

Revision history for this message
David Bond (david-davidbond) wrote :

5GBP (~7USD) Paypal bounty on this bugfix from me - care to join me Lisa, Raboof, Oroman, Guillermo? LEt's make it worthwhile someone's time to fix it...

Adrian Johnson seems to have a fix - how about we get a few USD together to make it worth his while?

Revision history for this message
Kjohrf (kjohrf) wrote :

Please fix this! It has caused problems (wasted time and paper) for me many times, and having to manually set the paper orientation every time you print is a real annoyance. Thanks!

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

The patch committed in https://bugs.launchpad.net/inkscape/+bug/179988/comments/177 has fixed the scale and rotation problem described in comment 20. I have tested printing with the current SVN inkscape on Linux and Windows. There are two remaining problems affecting print orientation and size:

1) gtk_page_setup_set_orientation() needs to be called with the orientation of the paper. I'm attaching a patch that fixes this. The patch has a bug where opening an existing landscape document and printing it does not work. The document properties dialog needs to first be opened and the landscape option reselected before printing. I'm sure one of the Inkscape developers knows a better way to get the page orientation for use in print.cpp.

2) Windows has a print offset problem. Bug report and patch at https://bugs.launchpad.net/inkscape/+bug/373309

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

It would be good to get these Windows printing bugs fixed for 0.47. The patch in the previous comment also fixes the large format printing bug in https://bugs.launchpad.net/inkscape/+bug/220360

Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed in rev. 22062.
Tested on Windows XP sp3. Please test with other OS.

Many thanks, Adrian!

Changed in inkscape:
milestone: none → 0.47
status: Confirmed → Fix Committed
Revision history for this message
jazzynico (jazzynico) wrote :

Successfully tested on Ubuntu 9.04.

Revision history for this message
su_v (suv-lp) wrote :

Landscape printing (A4) on OS X 10.5.8 with Inkscape 0.46+devel r22062 successful

Revision history for this message
su_v (suv-lp) wrote :

Inkscape 0.46+devel r22086, OS X 10.5.8, Brother HL-2035 laser

When I open a drawing saved with the document property 'Page orientation' set to 'Landscape', the print dialog tab 'Page Setup' still shows 'Portrait'. After closing the print dialog, changing the document property 'Page orientation' to 'Portrait' and back to 'Landscape' and reopening the print dialog, the print settings now correctly reflect the document setting of the page orientation 'Landscape' and prints the document correctly.

Printing without prior toggling of the 'Page orientation' setting doesn't work correctly (in my test case it only printed a line with several strokes that I could not relate to any part of the original drawing).

Print 'Preview' however respects the document settings, without toggling between 'portrait' and 'landscape'.

Hesitating to re-open, can anyone confirm this?

Revision history for this message
su_v (suv-lp) wrote :

correction: the printout without prior toggling of the page orientation prints the part of landscape drawing that fits on the paper in portrait format, but it doesn't print the strokes, only the nodes of the line drawing (contains only paths with black strokes 1px, no fills).

Revision history for this message
jazzynico (jazzynico) wrote :

~suv:
"When I open a drawing saved with the document property 'Page orientation' set to 'Landscape', the print dialog tab 'Page Setup' still shows 'Portrait'. After closing the print dialog, changing the document property 'Page orientation' to 'Portrait' and back to 'Landscape' and reopening the print dialog, the print settings now correctly reflect the document setting of the page orientation 'Landscape' and prints the document correctly."

Confirmed.
Since the bug is partially fixed, I've reopened this report "in progress".

Changed in inkscape:
status: Fix Committed → In Progress
Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

This patch should fix landscape printing when opening a saved landscape format document.

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

I've tested the above patch on both Windows and Linux. It seems to correctly fix the printing problem when opening a saved landscape document.

It would be good to get this fix in 0.47.

Revision history for this message
bbyak (buliabyak) wrote :

there's an error in this patch: an extra ) in print.cpp

could someone please confirm that the patch works as expected after the ) fix, then I will commit it

thanks!

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

I'm not sure how that happened. I must have pressed the wrong key between testing the change and generating the patch.

I've updated to 22167, applied the patch, removed the extra ')', compiled and tested. Works fine.

Revision history for this message
jazzynico (jazzynico) wrote :

Patch tested successfully on Ubuntu 9.04, with ~suv's test file (comment #30).
Thanks Adrian!

Revision history for this message
theAdib (theadib) wrote :

I removed the extra bracket applied the patch.
afterwards compiled fine and tested. ok.

Attached the corrected patch.

theAdib.

Revision history for this message
bbyak (buliabyak) wrote :

patch applied, closing

Changed in inkscape:
status: In Progress → Fix Released
theAdib (theadib)
Changed in inkscape:
assignee: nobody → Adrian Johnson (ajohnson-redneon)
Revision history for this message
howdyrichard (howdyrichard) wrote : Re: [Bug 166678] Re: Paper size or orientation are not used when printing

So how do I fix it?

Thank you,
Richard Fuller
713-417-5537

GOD, please save our nation!

________________________________
From: bbyak <email address hidden>
To: <email address hidden>
Sent: Sunday, September 6, 2009 5:04:24 PM
Subject: [Bug 166678] Re: Paper size or orientation are not used when printing

patch applied, closing

** Changed in: inkscape
      Status: In Progress => Fix Released

--
Paper size or orientation are not used when printing
https://bugs.launchpad.net/bugs/166678
You received this bug notification because you are a direct subscriber
of a duplicate bug.

Status in Inkscape: A Vector Drawing Tool: Fix Released

Bug description:
I tried to print a A4 landscape svg on an EPSON Stylus
C84 printer. The result was a portrait printout so I
had only the left 2/3 of the graphic on a not rotated page.

Revision history for this message
Pablo Trabajos (pajarico) wrote :

> So how do I fix it?
That means it will be in the next release.

Revision history for this message
Kjohrf (kjohrf) wrote :

I have 0.47pre4. I run on Win XP. When I have a landscape drawing and I bring up the print dialog,
and then click the Preferences button, the orientation is set to portrait. If I don't change it, it prints wrong.

Should it be fixed in 0.47pre4? If so, I think it is still broken.

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

It works for me. I removed my old install, downloaded and installed 0.47pre4. With landscape SVG files the print preferences default to landscape. Portrait SVG files default to portrait in the print preferences.

Revision history for this message
Kjohrf (kjohrf) wrote :

Interesting. I did not remove my old install, not knowing how stable pre4 is. Hopefully that's it.

Revision history for this message
Graham Seaman (graham-theseamans) wrote :

I've installed 0.47 (the unstable gentoo version). I have an svg drawing generated elsewhere as portrait. I load it into inkscape and set document type to landscape. The drawing appears to be rotated correctly, and I resize it to fit a full landscape page. I then save the drawing from inkscape as eps and process it through latex, dvi, and ps2pdf. The final drawing appears in the pdf output as a portrait drawing. Because of the resizing only half of it fits across the page.

Is this still another version of the same bug, or am I doing something wrong?

Thanks
Graham

Revision history for this message
su_v (suv-lp) wrote :

> I've installed 0.47 (the unstable gentoo version)
Is this the final Inkscape 0.47 r22583 or an earlier prerelease version? The 'Help > About Inkscape' dialog should tell you the revision number of your build or at least the version (e.g. Inkscape 0.47pre4).

> I load it into inkscape and set document type to landscape. The drawing appears to be rotated correctly
This does not happen with SVG documents created in Inkscape: changing the page orientation in 'Document Properties' does not edit (rotate) the objects of the drawing, it only resizes the page to the new landscape dimensions.

> I have an svg drawing generated elsewhere as portrait.
What software was used to create the SVG file? Did it add a 'ViewBox' element defining the document size? (see e.g. bug #454711 or other ViewBox related reports)

> Is this still another version of the same bug
AFAIU this bug is about printing, not about exporting to EPS/PS.

You could file a new bug and attach both the original SVG file and the exported EPS file so that others can try to reproduce the problem as far as Inkscape might be concerned.

Revision history for this message
Graham Seaman (graham-theseamans) wrote :

It is 0.47 r22583

My description was incorrect; you are right that it is only the page sizes which change, not the drawing.

My original svg was generated by gramps (gramps-project.org). There is no viewBox in this file.

Will submit this as a new issue. Thanks.

Changed in inkscape (Debian):
status: Unknown → Fix Released
Revision history for this message
Artem V. Ryabov (avryabov) wrote :

Still has this problem.

OS: Windows XP
version: 0.48.2

My paper size is A4 but when I try to print, I must always change paper size on printer settings from "Letter" to A4.
Do you need screenshots?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.