Paper size problem with "-recompute-dim"

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
martblek
Active Member
Posts: 29
Joined: Wed Sep 02, 2020 7:58 am

Paper size problem with "-recompute-dim"

Post by martblek » Wed Sep 09, 2020 9:23 am

Hello,
I have problem if i want export drawings into PDF or only print.
I'm using "-recompute-dim" in start QCad because i have a lot of garbled drawings. This solves my problems.
But if i change paper size to another paper format because drawings is not A4 these errors appears again.
Drawings changes to default / like opened without -recompute-dim /.

Any workaround ?
Thanks

Win10 and QCadCam 2.25.2

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

Re: Paper size problem with "-recompute-dim"

Post by andrew » Wed Sep 09, 2020 12:01 pm

We'll look into this and possible workarounds. The problem should also be fixed for the next release.

martblek
Active Member
Posts: 29
Joined: Wed Sep 02, 2020 7:58 am

Re: Paper size problem with "-recompute-dim"

Post by martblek » Wed Sep 09, 2020 12:03 pm

ok, thanks

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

Re: Paper size problem with "-recompute-dim"

Post by andrew » Thu Sep 10, 2020 2:42 pm

An immediate workaround is (if you are comfortable using scripts):
Misc > Development > Script Shell

Enter this in the script shell at the bottom and press enter after each line:

Code: Select all

doc=getDocument();
doc.setVariable("PageSettings/PaperWidth", 210, true);
doc.setVariable("PageSettings/PaperHeight", 297, true);
Then switch to print preview.

Replace the height / width with the desired paper size.

martblek
Active Member
Posts: 29
Joined: Wed Sep 02, 2020 7:58 am

Re: Paper size problem with "-recompute-dim"

Post by martblek » Fri Sep 11, 2020 7:31 am

thanks, this works.
Is possible to make option that automatically set paper size to match drawing after loading ?

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

Re: Paper size problem with "-recompute-dim"

Post by andrew » Fri Sep 11, 2020 8:47 pm

It's possible through scripting, yes.

You might also want to look at the command line tools which have various options to automatically generate PDF files from DXF/DWG drawings:
https://qcad.org/products/qcad-command-line-tools

In particular dwg2pdf and bbox might be interesting.

Post Reply

Return to “QCAD Troubleshooting and Problems”