PDF Export and Printing are slightly off scale

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.

Post Reply
TimO
Newbie Member
Posts: 6
Joined: Fri Jan 09, 2015 6:09 am

PDF Export and Printing are slightly off scale

Post by TimO » Fri Jan 09, 2015 6:17 am

I have a mockup of an airplane instrument panel that I'm trying to print to exact size on paper.
I printed it at home onto multiple 8.5x11" sheets and it appeared to be off scale a little when assembled.
So I took the exported .pdf to a FedEx/Kinkos and had them print it actual size to a large format printer.

The approx. size of the panel is 16" x 40". What I found was that the printed image was slightly smaller
than the actual parts. I verified by dimensioning within qcad that the parts were created to the proper size, but the pdf just comes out too small. It's even noticeable if you measure on the PC monitor.

It appears that to print correctly, I'd have to scale very slightly, like print 1:1.0042

I have also tried rather than just using the built-in pdf export, printing to a pdf print driver set to a 24" x 48" sheet of paper. That comes out with the same results.

Within the pdf print driver, I do have the ability to scale to adjust a little, but only in full percentages (i.e. 101%) which is not fine enough to be able to get almost perfect.

The print shop CAN print DWF files or PDF files. But I don't think that Qcad pro can export .dwf format.

Can anyone give any tips that may get this thing to print to perfect scale?
Thanks for any help!
Using 3.7.5 pro on both Linux and Windows

User avatar
Clive
Moderator
Posts: 1329
Joined: Thu Aug 25, 2011 9:28 pm
Location: UK

Re: PDF Export and Printing are slightly off scale

Post by Clive » Fri Jan 09, 2015 10:05 am

Hi TimO and welcome to the forum

Please indicate what version of QCAD and what operating system you are using.

Is the drawing of the instrument panel something you have drawn - or is it from another source?

Could you possibly draw a simple shape at the same size as your instrument panel and test again and if you get the same problem post the file to this forum for testing.
For the best support please state your operating system, QCAD version and add any supporting DXF/DWG files, screenshots etc...

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

Re: PDF Export and Printing are slightly off scale

Post by andrew » Fri Jan 09, 2015 10:46 am

TimO wrote:It's even noticeable if you measure on the PC monitor.
I don't think you can expect that kind of precision from a PC monitor. If you display a PDF at 100% scale or 'Actual Size', the PDF viewer uses the known screen resolution to calculate the scale. However, display resolutions are not exact and the distortion can usually even be adjusted. On my display for example, displaying an A4 at 'Actual Size' gives me a paper size of about 211mm x 299mm instead of the expected 210mm x 297mm. You might want to measure the total paper size of an A4 print on your display to check how much the error is on your display.

When it comes to printers, they are usually not that precise either. Most printers have a roll to move the paper through the printer. There is a slight slip between the roll and the paper which is probably taken into account by the manufacturer, but I would imagine that this slip depends also on the paper type and thickness.

Bottom line: If you need a very precise print, you will not get around experimenting with the target printer first and adjusting the scale of your drawing or PDF accordingly.

Manual printer calibration by entering an X and Y scale factor is planned for a future release.

User avatar
Clive
Moderator
Posts: 1329
Joined: Thu Aug 25, 2011 9:28 pm
Location: UK

Re: PDF Export and Printing are slightly off scale

Post by Clive » Fri Jan 09, 2015 10:54 am

Using QCAD pro 3.7.5.

I've just drawn a rectangle with dimensions of 40 x 16 inches and used the PDF export command. Opened up the pdf in Adobe Illustrator (CS6) checked the sizes and they are exact, I don't think this issue lies with QCAD.
For the best support please state your operating system, QCAD version and add any supporting DXF/DWG files, screenshots etc...

TimO
Newbie Member
Posts: 6
Joined: Fri Jan 09, 2015 6:09 am

Re: PDF Export and Printing are slightly off scale

Post by TimO » Fri Jan 09, 2015 4:23 pm

Hey guys, just getting back to check the forum today.

First, yup, I know that the monitor display won't be correct in many cases...that was just a bonus if it would be. And, I should have said that I am using 3.7.5 pro, which I just paid for yesterday. Always glad to support open source!!

I did some testing today and created both a new drawing, and took my old .dwg file and deleted all the elements. In both files I created a new 7"x9" dimensioned rectangle, and did some test prints. Prints from the app, prints from the pdf viewer. After making sure I was set to A4 Letter and everything, and was well within the margins of the paper, I was getting really wild results from the pdf prints..the 2 didn't match. But when printing both diagrams from the app it was very close.
Interestingly, 7" wide (portrait mode) measured 7". But 9" tall measured 8.95" actual on paper. So that was very close but still not right...printed direct from the app.

I did find that despite printing from the PDF Viewer as "actual size", actual size doesn't always mean that. I tried also turning off the auto rotate and auto center since the drawing was already rotated and centered properly, and then hit the SCALE button and chose NONE. Once I did that, my PDF prints came out exactly like printing from the CAD App. (7"=7", but 9"=8.95") Today I was pdf printing in FoxIt, but at Kinkos it was Adobe. Also, within the pdf viewer, if I turned on rulers, the lines measured exactly correct, using the rulers function. So you're right that I don't think it's Qcad doing it. It has to be either in the pdf viewer's print function, the print driver, or the printer itself.

Now I just don't know where to go from here. It doesn't appear that I am able to do anything to fix it on my 8.5x11" laser jets because although foxit can scale by .1 degrees, my horizontal measures fine, so I wouldn't want to scale equally between horizontal and vertical.
And at Kinkos, I have no idea what they did, so I'll probably have to go back and have them print it again and see how it comes out this time, with me helping them choose the proper print options.


So you're right. I think Qcad isn't the source. If there are more tips, I'd be thrilled to hear them, but I am feeling like I beat the horse half dead and hate dragging you all into my printing mess too far. :)
I did attach my test .pdf and .dxf files for looking at.
Attachments
Test9.dxf
(107.18 KiB) Downloaded 498 times
Test9.pdf
(8.25 KiB) Downloaded 485 times
Using 3.7.5 pro on both Linux and Windows

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

Re: PDF Export and Printing are slightly off scale

Post by andrew » Fri Jan 09, 2015 4:32 pm

TimO wrote:Interestingly, 7" wide (portrait mode) measured 7". But 9" tall measured 8.95" actual on paper. So that was very close but still not right...printed direct from the app.
Yep, makes perfect sense. See my comment about printer rolls and paper slippage above.

Here's an unofficial solution in case you are happy messing with source code:
- Open the file scripts/File/Print/Print.js from the QCAD installation directory.
- Look for line // printer calibration goes here (future use):
- Change the next two lines to (remove the // at the start of the line):

Code: Select all

printerFactor.x *= 1;
printerFactor.y *= 9/8.95;
- Restart QCAD

If your printer has a consistent paper / roll slippage, this should produce a more precise print on your own printer at least.

TimO
Newbie Member
Posts: 6
Joined: Fri Jan 09, 2015 6:09 am

Re: PDF Export and Printing are slightly off scale

Post by TimO » Fri Jan 09, 2015 4:49 pm

Holy Macaroni!
That actually worked perfectly for the print directly from the app!

I see that the commented out default values are:
//printerFactor.x *= 200/200.05;
//printerFactor.y *= 280/280.30;

So it must be fairly common?

I really have a hard time believing it is due to paper/roller slippage, because it's almost perfectly repeatable, but are you saying that printers have a known normal amount of slippage in them that always has to be compensated for?

I also tried to do the pdf export, and see how that print worked. My assumption was that this would only affect the app printing, but the pdf export would not be affected. I was wrong. The print from the pdf viewer now worked exactly the same too.

Now there is one downside....within the pdf itself, if I turn on the ruler functions, the width is still 7", but the height is now more than 9"...so it actually makes your .pdf file NOT to scale....but it corrects the print error. So you wouldn't want to give the file to someone else (pdf version) and have them print it on their printer which may need different adjustments.

I think my best bet is going to be taking the original .dxf file to Kinkos, have them print, and then measure it. If it isn't correct, have them fix the print scale. If I tried to do it from Qcad, it may take multiple trips back and forth to Kinkos to get the proper scaling done.

I uploaded the new Test9.pdf printed with the scaling if anyone wants to see the affect on pdf export.
Attachments
Test9.pdf
(5.81 KiB) Downloaded 489 times
Using 3.7.5 pro on both Linux and Windows

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

Re: PDF Export and Printing are slightly off scale

Post by andrew » Fri Jan 09, 2015 5:11 pm

TimO wrote:I see that the commented out default values are:
//printerFactor.x *= 200/200.05;
//printerFactor.y *= 280/280.30;

So it must be fairly common?
No, these are just experimental values from my own printer here (an HP LaserJet which actually produces slightly too large output for heights, my theory is that is might overcompensate for paper slippage).
I really have a hard time believing it is due to paper/roller slippage, because it's almost perfectly repeatable
It's just a theory I have :) But it sounds feasible, since any friction based system is bound to have some slippage and manufacturers are likely to account for that either printer internally or in the printer driver somehow. Unfortunately, I've never seen a printer for which this would be adjustable.
I also tried to do the pdf export, and see how that print worked. My assumption was that this would only affect the app printing, but the pdf export would not be affected. I was wrong. The print from the pdf viewer now worked exactly the same too.
Editing Print.js affects both prints and PDF output since they both use the same code. It's definitely a hack to adjust Print.js directly. Ideally, there would be some per printer configuration option for printer calibration.

greener
Registered Member
Posts: 1
Joined: Mon Feb 02, 2015 8:45 pm

Re: PDF Export and Printing are slightly off scale

Post by greener » Mon Feb 02, 2015 8:54 pm

Thank you for the hint with Print.js
I had the same problem with different laser printers. But the scaling was always very accurate wiith my old Canon i560 inkjet printer.

mink
Active Member
Posts: 30
Joined: Mon Jan 19, 2015 7:20 pm

Re: PDF Export and Printing are slightly off scale

Post by mink » Tue Feb 03, 2015 1:44 pm

Hi,

don't forget the material you are printing on. Paper varies its size depending on temperature and humidity, and this can be several percent. I remember all the struggle when working with a plotter vendor to get correct plot sizes in the mid 80's ;-).
Summary: exact print sizes are impossible on paper. Mylar and more accurate, but far away from perfect ...

Regards,

Ulrich

Post Reply

Return to “QCAD Troubleshooting and Problems”