Problem with ColorSettings/ColorMode in PDF export

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 Operating system, QCAD version
Attach Drawing files, Screenshots
Post Reply
spatz
Junior Member
Posts: 16
Joined: Sun Mar 11, 2012 12:25 pm

Problem with ColorSettings/ColorMode in PDF export

Post by spatz » Tue Mar 03, 2015 9:18 pm

Hello,

System: QCAD 3.7.4 and 3.8.1 downloaded as zip/tar.gz archive on Linux Mint Debian and Windows 7.

I wrote a script for batch export PDF from AutoCAD drawing files (AC1009). The script file is located under "../scripts/Misc/Examples/IOExamples/BatchCreatePDF/". Everything is working fine except that the row

Code: Select all

doc.setVariable("ColorSettings/ColorMode", "BlackWhite");
doesn't seem to have an effect. The output PDF file is the same as in "GrayScale" mode. "FullColor" mode works as expected.

Is there something wrong with my code or is it a bug?

Regards
Stephan
Attachments
BatchCreatePDF.js
(4.37 KiB) Downloaded 114 times

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

Re: Problem with ColorSettings/ColorMode in PDF export

Post by andrew » Wed Mar 04, 2015 1:49 pm

Can you try setting it on the view instead?
view.setColorMode(RGraphicsView.BlackWhite);

spatz
Junior Member
Posts: 16
Joined: Sun Mar 11, 2012 12:25 pm

Re: Problem with ColorSettings/ColorMode in PDF export

Post by spatz » Wed Mar 04, 2015 2:12 pm

Hello Andrew,

thank you for the reply. I've just added your code line and commented the other out. Now it works as intended at least for qcad 3.8.1 on windows 7 which is the only one I could test for now.

Thank you!
Stephan
Attachments
BatchCreatePDF.js
(4.77 KiB) Downloaded 119 times

Post Reply

Return to “QCAD Troubleshooting and Problems”