dwg2pdf function consult

Do you have a question you want to ask an existing QCAD user about QCAD and what you can do with it? Do you want to know if a particular feature exists? This is the place to ask.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
fchaoyang
Junior Member
Posts: 11
Joined: Tue Jun 18, 2024 11:26 am

dwg2pdf function consult

Post by fchaoyang » Fri Jun 28, 2024 9:44 am

dwg2pdf, this api parameter can support all files in a folder batch to pdf

CVH
Premier Member
Posts: 4950
Joined: Wed Sep 27, 2017 4:17 pm

Re: dwg2pdf function consult

Post by CVH » Fri Jun 28, 2024 9:54 am

Strange line of questioning ...

You probably need to write a batch file that cycles all dxf/dwg files in a folder and call dwg2pdf for each.
Refer to: https://www.qcad.org/rsforum/viewtopic. ... 660#p44660

Regards,
CVH

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

Re: dwg2pdf function consult

Post by andrew » Fri Jun 28, 2024 10:30 am

Under Windows, you can use a Batch command to call dwg2pdf for each file in the current directory, for example:

Code: Select all

for %f in (*.dxf) do dwg2pdf.bat -o %~nf.pdf %f
Under Linux / macOS, you can use Bash to achieve the same:

Code: Select all

for f in *.dxf; do dwg2pdf -o "${f%.dxf}.pdf" $f; done
These are just examples, you might need to adjust this to your specific needs. An Internet search engine or an AI can help with Batch / Bash programming as this has nothing to do with QCAD.

If you have many files to convert, you might want to run multiple background processes to use your CPU cores effectively. Again, there are plenty of resources on the Internet about these topics.

Post Reply

Return to “Pre-sales Questions”