Hello,
I am using Windows 10 22H2 and QCADCAM 3.32.3 I am trying to batch process a directory of DXF files, and while the GUI Export to PDF works, the command line does not.
In the directory I have a batch file (I have tried two)
for %%D in (*.dxf) DO "c:\progra~1\QCADCAM\dwg2pdf.bat" -a -p A4 -f %%D
pause
for %%D in (*.dxf) DO "c:\progra~1\QCADCAM\dwg2pdf.bat" %%D
pause
When batch processed, there is a lot of debug information; however, the output to PDF is incomplete.
I have attached a few example files.
DXF_03-01-031-A01x16e.pdf is an export
DXF_03-01-031-A01x16.pdf is batch processed with no parameters
DXF_03-01-031-A01x16.dxf is the raw DXF file.
There is a lot of debug information shown and at the tail of the debug (for another file) the following is shown.
07:46:43: Debug: value (filename): "YuGothM.ttc"
07:46:43: Debug: key: "Yu Gothic Regular & Yu Gothic UI Semilight (TrueType)"
07:46:43: Debug: value: "YuGothR.ttc"
07:46:43: Debug: value (filename): "YuGothR.ttc"
Warning: cannot assign original handle to object "0xfa"
Warning: collision with object of type: 18
Warning: new handle "0x10d"
Converting
from: C:/Temp/6305/6305-10\DXF_03-01-040-B01x4.dxf
to : C:/Temp/6305/6305-10\DXF_03-01-040-B01x4.pdf
Warning: RGraphicsViewImage::paintOverlay: no workers
I have tried a few different versions of DXF but no difference is observed.
How do I use batch export to convert a directory of DXF files to PDF? I can use the PDF Export function in the GUI it works (scaled/centred); however, the batch processing is not working.
If anyone has some advice, it would be appreciated.
Thank you.
[SOLVED] How do I troubleshoot PDF export and batch processing differences
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Junior Member
- Posts: 11
- Joined: Tue Sep 05, 2017 11:36 am
[SOLVED] How do I troubleshoot PDF export and batch processing differences
- Attachments
-
- DXF_03-01-031-A01x16e.pdf
- (28.63 KiB) Downloaded 258 times
-
- DXF_03-01-031-A01x16.pdf
- (28.63 KiB) Downloaded 249 times
-
- DXF_03-01-031-A01x16.dxf
- (31.82 KiB) Downloaded 263 times
-
- DXF_03-01-028-A01x8.dxf
- (32.62 KiB) Downloaded 241 times
Last edited by 2CV375 on Tue Sep 09, 2025 8:33 am, edited 1 time in total.
-
- Premier Member
- Posts: 4919
- Joined: Wed Sep 27, 2017 4:17 pm
Re: How do I troubleshoot PDF export and batch processing differences
Hi,
Please refer to the online usage reference for dwg2pdf
Also displayed using the -h or -help switch.
I would already use the -color-correction switch to prevent white on white.
The two Dimension use an entity defined custom color #808080 (50% Black).
Other entities use 'By Layer' and the layers that have entities on them are white.
In the attached drawing files all entities use Lineweight 'By Layer' and all layers use Lineweight 'Default'.
The default Lineweight is user defined and yours may be different than the one I use (0.25mm (ISO)).
See menu Edit .. Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights
Avoid using very narrow Lineweights or weight '0.00mm'.
The Lineweight does not scale up with paper scale, nor down.
It are historical pen sizes of physical pens to draw directly with ink on paper.
With -min-lineweight=LW and -max-lineweight=LW one can limit the pen size in the export.
Note that in model view it is common that Screen-based Linetypes (and weights) (NL) are used.
A hybrid system based on pixels with a minimum of 1px.
It will never be printed/exported this way.
Clearing NL shows the actual weights in the drawing unit but also un-scaled because model view has no paper scale.
Remark that both attached drawing files use the unit 'None' or undefined.
Disregard the debug info on font names and font files (Windows related)
In my case that was an endless loop (FS#2684 >3.32.1)
Should be fixed in the recent release.
Collisions of entity handles are fixed 'on the fly', the file was probably not generated by QCAD.
The last entry is probably interesting for Andrew to know.
Regards,
CVH
Please refer to the online usage reference for dwg2pdf
Also displayed using the -h or -help switch.
I would already use the -color-correction switch to prevent white on white.
The two Dimension use an entity defined custom color #808080 (50% Black).
Other entities use 'By Layer' and the layers that have entities on them are white.
In the attached drawing files all entities use Lineweight 'By Layer' and all layers use Lineweight 'Default'.
The default Lineweight is user defined and yours may be different than the one I use (0.25mm (ISO)).
See menu Edit .. Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights
Avoid using very narrow Lineweights or weight '0.00mm'.
The Lineweight does not scale up with paper scale, nor down.
It are historical pen sizes of physical pens to draw directly with ink on paper.
With -min-lineweight=LW and -max-lineweight=LW one can limit the pen size in the export.
Note that in model view it is common that Screen-based Linetypes (and weights) (NL) are used.
A hybrid system based on pixels with a minimum of 1px.
It will never be printed/exported this way.
Clearing NL shows the actual weights in the drawing unit but also un-scaled because model view has no paper scale.
Remark that both attached drawing files use the unit 'None' or undefined.
Disregard the debug info on font names and font files (Windows related)
In my case that was an endless loop (FS#2684 >3.32.1)
Should be fixed in the recent release.

Collisions of entity handles are fixed 'on the fly', the file was probably not generated by QCAD.
The last entry is probably interesting for Andrew to know.
Regards,
CVH
-
- Junior Member
- Posts: 11
- Joined: Tue Sep 05, 2017 11:36 am
[SOLVED] Re: How do I troubleshoot PDF export and batch processing differences
Thank you, CVH.
I updated to 3.24.4 and changed to these commands:
for %%D in (*.dxf) DO "c:\progra~1\QCADCAM\dwg2pdf.bat" -auto-fit -paper=A4 -flat -landscape -color-correction %%D
pause
A much better result. And yes font errors are gone.
Even if I read the manual, I would never have guessed the -color-correction option would fix my issue as printing in the GUI works. I would assume GUI defaults = commandline defaults.
Much appreciated.
I updated to 3.24.4 and changed to these commands:
for %%D in (*.dxf) DO "c:\progra~1\QCADCAM\dwg2pdf.bat" -auto-fit -paper=A4 -flat -landscape -color-correction %%D
pause
A much better result. And yes font errors are gone.
Even if I read the manual, I would never have guessed the -color-correction option would fix my issue as printing in the GUI works. I would assume GUI defaults = commandline defaults.
Much appreciated.
-
- Premier Member
- Posts: 4919
- Joined: Wed Sep 27, 2017 4:17 pm
Re: [SOLVED] How do I troubleshoot PDF export and batch processing differences
Hi,
There is no immediate way to alter Application Preferences via the Command Line.
Nor to alter all Drawing Preferences stored in the drawing itself. (Page size, orientation, ...)
There are Application Preferences that apply.
For example: Lineweight default = ...
Concerning layer or entity color:
I never understood the tendency to draw on white layers
CAD pen sizes are from the historical physical pens we used to draw directly with ink on paper.
And then I never used a pen with white ink.
About all were filled with black ink.
Many decades ago, large size plan reproduction was indeed as white details on blue.
But the original was never drawn with white.
I have the color correction active to draw in model view with typically a black or very dark background.
That is more gentle for your eyes in the long run.
My layers do not use white in general, never, they use black where that is appropriate.
The color correction preference is thus by default not active for printing or exporting to PDF.
Regards,
CVH
I understand your confusion but it wouldn't work out that way.
There is no immediate way to alter Application Preferences via the Command Line.
Nor to alter all Drawing Preferences stored in the drawing itself. (Page size, orientation, ...)
There are Application Preferences that apply.
For example: Lineweight default = ...
Concerning layer or entity color:
I never understood the tendency to draw on white layers

CAD pen sizes are from the historical physical pens we used to draw directly with ink on paper.

About all were filled with black ink.
Many decades ago, large size plan reproduction was indeed as white details on blue.
But the original was never drawn with white.
I have the color correction active to draw in model view with typically a black or very dark background.
That is more gentle for your eyes in the long run.
My layers do not use white in general, never, they use black where that is appropriate.
The color correction preference is thus by default not active for printing or exporting to PDF.
Regards,
CVH