Printing

Drop in here to discuss whatever you want.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
Matangi_Controls
Newbie Member
Posts: 8
Joined: Thu Nov 15, 2018 10:24 am

Printing

Post by Matangi_Controls » Fri Nov 16, 2018 7:08 am

is there any way to print multiple QCAD files together ?

I have created separate drawing file for each drawing and now i have to open them one by one to print and it take lot of time. so please let me know if there is any easy way.

thanks
Mitesh Maniar

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

Re: Printing

Post by andrew » Fri Nov 16, 2018 9:50 am

Not from the user interface, no. Just like in any other application, to print a file, you have to open it and print.

Depending on how many files we are talking about, it might be worth looking at the command line tool dwg2pdf which comes with QCAD. With a simple Batch (Windows) or Bash (macOS / Linux) script you can use dwg2pdf to either produce PDF files from a number of DXF / DWG files or even to print them directly. I understand that this is an advanced concept that might or might not be interesting for your use case.

DougVW
Junior Member
Posts: 16
Joined: Mon Jan 08, 2018 5:03 pm

Re: Printing

Post by DougVW » Fri Nov 16, 2018 3:35 pm

Dwg2pdf works great, yet I think that multi-page PDF is being requested. Last time I checked, dwg2pdf only produces single page output. (see my request at https://qcad.org/rsforum/viewtopic.php? ... 43&p=21509 ) Multi-page PDF can be assembled using other tools, such as pdftk.

Matangi_Controls
Newbie Member
Posts: 8
Joined: Thu Nov 15, 2018 10:24 am

Re: Printing

Post by Matangi_Controls » Tue Mar 12, 2019 12:06 pm

Can you also advise about script to be written to print multiple files ?

Example script ?

Regards,
Mitesh

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

Re: Printing

Post by andrew » Tue Mar 12, 2019 12:10 pm

The command line tool dwg2pdf is included with QCAD Professional and can be used to create PDFs from multiple files or to print multiple files directly.

In Bash (Linux / macOS):

Code: Select all

for f in *.dxf;
do
    dwg2pdf [command line options] $f
done

Matangi_Controls
Newbie Member
Posts: 8
Joined: Thu Nov 15, 2018 10:24 am

Re: Printing

Post by Matangi_Controls » Tue Mar 12, 2019 12:14 pm

sorry but can you please advise what code i will need to execute for files store on my windows PC desktop in print pdf folder ?
Regards,
Mitesh

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

Re: Printing

Post by andrew » Tue Mar 12, 2019 12:53 pm

Under Windows, you'd have to use something called "Batch" which I'm not familiar with...

You might want to try to Google for "batch programming windows iterate files".

DougVW
Junior Member
Posts: 16
Joined: Mon Jan 08, 2018 5:03 pm

Re: Printing

Post by DougVW » Wed Mar 27, 2019 2:41 pm

Thanks to Andrew for also adding multiple sheet support in Dwg2Pdf for QCAD 3.22.

Here's an example of a 3-page PDF export from Linux command line:
/usr/share/httpd/opt/qcad-3.22.0-pro-linux-x86_64/dwg2pdf -platform offscreen -a -f -block="Layout2,Layout3,Layout4" -m 5 -l -p "ANSI C (431.8x558.8)" mydrawing.dxf

I haven't tried this in awhile, but this should be an example for Windows command line: (maybe CD "C:/Program Files/QCAD" first?)
"C:/Program Files/QCAD/qcad.exe" -autostart scripts/Pro/Tools/Dwg2Pdf/Dwg2Pdf.js dwg2pdf.bat -a -f -block="Layout2,Layout3,Layout4" -m 5 -l -p "ANSI C (431.8x558.8)" "C:/Users/Me/Documents/mydrawing.dxf"

Post Reply

Return to “Chat”