Printing Orientation Issue

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

User avatar
rdtsc
Newbie Member
Posts: 4
Joined: Sun May 22, 2022 11:45 pm
Location: Ohio, USA

Re: Printing Orientation Issue

Post by rdtsc » Fri Mar 22, 2024 4:43 pm

Interesting... been working on some prints for months. Have printed them fine before (all landscape A4 / "letter".) Went to print them yesterday (prior to machining, go figure), and a previously-printed-landscape drawing suddenly started printing portrait (and cutting half of the image off.)

The preview shows it as landscape, all settings are set to landscape, but it prints portrait anyhow - regardless of QCAD drawing, application, or printer setting.

Okay, so figured it was something with that machine. Took the .dxf to work, started QCAD there and printed it... lo-and-behold it's doing exactly the same thing there. Set to landscape, but prints portrait.

Home machine is running latest Mabox Linux (Manjaro, Arch.) Brother color laser printer.
Work machine is Win11, Canon B&W multi-function printer.
QCAD-CAM is 3.27.8.0

Have printer page orientations suddenly changed on the back-end for both Linux and Windows operating systems? Not sure what exactly is going on here but it's baffling.

Edit: tried it again at work, and this time the printer driver came up as portrait. Set it to landscape and it printed normally. Weird.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Printing Orientation Issue

Post by CVH » Fri Mar 22, 2024 5:37 pm

Running mostly 3.27.6.0 on Win7 32bit and all is fine even with drawings from other users.

My OS is no longer supported and I don't get the regular annoying automatic updates anymore :P
Meaning that everything has basically remained the same as long before 2022.

My CNC dedicated Win 10 64bit setup with a trial copy of the latest QCAD is downstrairs and that one is stand-alone ... Not connected to the net.
I only can test printing when I move and connect the printer to it, and it works flawlessly ...
... Probably because it can't connect and update the OS.

I think it is time to file a bug report on QCAD Bugtracker ... Although it is probably OS related. :wink:
https://www.ribbonsoft.com/bugtracker/

Regards,
CVH

bruceb1952
Junior Member
Posts: 10
Joined: Wed Mar 15, 2023 1:46 am

Re: Printing Orientation Issue

Post by bruceb1952 » Sat Mar 23, 2024 10:02 pm

This is where things get sticky... BIG dog LITTLE dog.
Who cares/needs to resolve? I'm (kind of) glad that I am not the only person encountering the problem. On the scale of things, the issue can be avoided by paying attention to the Portrait/Landscape setting before 'hitting' Print. BUT... more problematic issues may be lurking as users running later OS, different OS move forward.
CVH, thanks for your continued interest.

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Printing Orientation Issue

Post by CVH » Sun Mar 24, 2024 5:18 pm


User avatar
rdtsc
Newbie Member
Posts: 4
Joined: Sun May 22, 2022 11:45 pm
Location: Ohio, USA

Re: Printing Orientation Issue

Post by rdtsc » Sun Mar 24, 2024 7:07 pm

One thing that did work Bruce, when selecting landscape still resulted in a failed print, was printing to PDF from QCAD, then opening the PDF and printing that. Going the PDF-intermediate-route will force some printer margin, so the result will be slightly zoomed-out.

Researching, tried printing an Excel spreadsheet at home (Linux) in landscape: worked fine; printer driver opened in portrait, selected landscape, all good. Tried QCAD - nope. Driver doesn't ask for portrait or landscape, seems to force portrait. Forced QCAD to portrait, result still landscape-on-portrait but shifted slightly. Using latest Linux CUPS 1:2.4.7-2. Perhaps there is an odd edge-case with this version of the Common Unix Printing System (may also affect Apple Mac CUPS users?) No talk of any issues yet but several CUPS bugs were patched August of 2023.

Edit: attached the following template for testing. It is metric on Letter portrait, for dark theme.
LetterTest.dxf
Border and title which refuses to print Letter landscape in Linux
(125.6 KiB) Downloaded 8 times

bruceb1952
Junior Member
Posts: 10
Joined: Wed Mar 15, 2023 1:46 am

Re: Printing Orientation Issue

Post by bruceb1952 » Mon Mar 25, 2024 11:24 pm

rdtsc,
I concur with your additional 'testing' that QCAD has ownership of fixing. I also saw correct behavior via alternate apps but continued to have the problem with QCAD.
Along with paying attention to the Orientation BEFORE hitting Print button, I also concur that going PDF route is a work-around but not ideal.
I see that CVH has logged the issue in QCAD development environment, so I trust a fix will POP out sometime.
Bruce

User avatar
andrew
Site Admin
Posts: 9063
Joined: Fri Mar 30, 2007 6:07 am

Re: Printing Orientation Issue

Post by andrew » Tue Mar 26, 2024 9:05 am

bruceb1952: I cannot reproduce the problem here. Unfortunately, this seems to be an issue somewhere between Qt and your particular printer driver. QCAD sets the page size and orientation as configured. QCAD might be able to provide a workaround for the problem if we can understand it properly though. This will likely require some iterations, so we would need your help with this, since we cannot test any potential workaround here.

There's a slight possibility that your driver changes the page settings while presenting the printer dialog. To verify this, you can help us by copying the attached file into your QCAD installation under:

C:\Program Files\QCAD Professional\scripts\File\Print\Print.js

Note that the "C:\Program Files\QCAD Professional" part might be different on your installation. You need to find the folder where QCAD is actually installed. The scripts\File\Print folders need to be created and Print.js copied into it.

This is not a potential fix. It simply prints the page settings into the QCAD command line history before and after showing the printer dialog. If these don't match that would make a workaround possible. If you can let us know what is printed in the command line history while printing, that might be helpful thanks.

The output should look similar like this:

Code: Select all

Page size before dialog:297/210
Page orientation before dialog:Landscape
Page size after dialog:297/210
Page orientation after dialog:Landscape

CVH
Premier Member
Posts: 3480
Joined: Wed Sep 27, 2017 4:17 pm

Re: Printing Orientation Issue

Post by CVH » Tue Mar 26, 2024 9:34 am

andrew wrote:
Tue Mar 26, 2024 9:05 am
Note that the "C:\Program Files\QCAD Professional" part might be different
Andrew,
...QCAD/scripts/File does not exist on a standard installation.

Only including ...QCAD/scripts/File/Print/Print.js corrupted the tool.
A) Print Preview does not switch to preview mode but the Options Toolbar is displayed.
B) After hitting the button 'Print ...' the tool halted after:

Code: Select all

Page size before dialog:609.6/914.4
Page orientation before dialog:Portrait
QCAD is further unresponsive ...
Killed the QCAD process.
A new trial halted loading QCAD at 73%

Regards,
CVH

User avatar
andrew
Site Admin
Posts: 9063
Joined: Fri Mar 30, 2007 6:07 am

Re: Printing Orientation Issue

Post by andrew » Tue Mar 26, 2024 9:47 am

Right, thanks. I've removed the file as this seems to be not possible, at least on Windows.

bruceb1952
Junior Member
Posts: 10
Joined: Wed Mar 15, 2023 1:46 am

Re: Printing Orientation Issue

Post by bruceb1952 » Wed Mar 27, 2024 2:03 am

CVH, Thanks for your intervention. I accept that there might be something exclusively 'wrong' in my environment that will need a deeper analysis. That deeper analysis activity could get me in over my head. Hopefully this issue is generic.
andrew, Thanks for your intervention.
Bruce

Post Reply

Return to “QCAD Troubleshooting and Problems”