Page 1 of 1

dwg2pdf scaling to fit on Windows

Posted: Wed Jan 31, 2018 11:08 pm
by DougVW
We've got a pilot working well of QCAD server on CentOS 7 and it is scaling pages as intended with the following command line:

/usr/share/httpd/opt/qcad-3.18.1-pro-linux-x86_64/dwg2pdf -platform offscreen -a -f -block=*Paper_Space -m 2 -l -p "ANSI C (431.8x558.8)" "/var/www/html/Output/custom.dxf"

I have been asked to move this to a Windows 2008 Server for production. (here we installed from "qcad-3.19.2-pro-win64-installer.msi") The software seems to be working fine on this version by GUI, and it is converting to PDF output with no errors. However, the scale to fit is not as expected. The PDF output is mostly blank with a tiny "postage stamp" sized drawing in the lower left corner. I was unable to get the DWG2PDF.BAT to work, so it is unrolled as follows:

"D:/Program Files/QCAD/qcad.exe" -no-gui -autostart scripts/Pro/Tools/Dwg2Pdf/Dwg2Pdf.js dwg2pdf.bat -a -f -block="*Paper_Space" -m 2 -landscape -p "ANSI C (431.8x558.8)" "D:/Project/Output/custom.dxf"

These command lines are being called from Python 3 programs on both platforms. I would appreciate suggestions on how to make these drawings scale to fit on Windows. Thanks.

Re: dwg2pdf scaling to fit on Windows

Posted: Thu Feb 01, 2018 11:37 am
by andrew
Thanks for your report.

Please attach or e-mail the file custom.dxf, so we can look into this. Thanks.

Re: dwg2pdf scaling to fit on Windows

Posted: Thu Feb 01, 2018 7:38 pm
by DougVW
I will try to get you a sample, but it may be next week before I can find or prepare a non-proprietary sample. I tested your "ANSI C Landscape.dxf" but modelspace scales OK and paperspace doesn't seem to be setup. For now, I can just report the following results using the same command line options on 3 Linux versions:

qcad-3.18.1-trial-linux-x86_64 # scale to FIT OK
qcad-3.19.1-trial-linux-x86_64 # tiny scale output
qcad-3.19.2-pro-linux-x86_64 # tiny scale output

It looks like I may be able to get the Windows server going for now by downgrading to 18.1-pro so this is not urgent. (18.1 also does a very good job of converting our DWG & DXF to PDF) Thanks again.

Re: dwg2pdf scaling to fit on Windows

Posted: Fri Feb 02, 2018 12:19 pm
by andrew
Thanks for the details.

I've created a bug report at:
http://www.qcad.org/bugtracker/index.ph ... sk_id=1712

Re: dwg2pdf scaling to fit on Windows

Posted: Thu Feb 08, 2018 9:24 pm
by DougVW
A sample ANSI C Landscape drawing is attached that has the same results for me as reported 2018-02-01. Version 3.18.1 does a good scale to fit and 3.19 does not.
custom.dxf
sample DXF for dwg2pdf testing
(157.36 KiB) Downloaded 207 times

Re: dwg2pdf scaling to fit on Windows

Posted: Fri Feb 09, 2018 2:09 pm
by andrew
Thanks. As far as I can tell, this has been fixed for the next release. Attached is the output of the current development version:

dwg2pdf -a -f -block="*Paper_Space" -m 2 -landscape -p "ANSI C" -o custom.pdf custom.dxf