DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Batching printing to PDF

Started by landonairey, August 12, 2013, 11:15:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

landonairey

Has anyone used PDFCreator to convert dc files to PDF?

If so then
     have you been able to successfuly convert with a vbscript? I have a script that you can drag and drop a group of files to and it will convert all of them to their respective named pdf files. However, this process doesn't work for dc files, it flags the file as non-printable. But, I CAN print to the PDFCreator within DesignCad>File>Print and out pops a PDF just fine... Any thoughts?
(For various reasons I cannot just manually setup a batch print to CutePDF or PDFCreator)

end if  ' :)

JJG

#1
Yes, I use it.

Note that it isn't question to "convert" a dcd-file to pdf-file : PdfCreator is a "virtual" printer.
So, you have to run the "Print" command (in DesignCad), then choose the PdfCreator as printer, set your settings for printing (size of the page, resolution, scale, etc...) and simply "print" ;
Then, you find the pdf-file in the directory you have define.
;)

magic

Hi both,

I tried setting up CutePDF as the default printer, and used Batch Print... to try to print this way, and it looks as if it works and suggests file names, but it only actually saves the last drawing in the batch.
It's a kind of magic!




landonairey

#3
Thanks for the replies,
JJG-My goal is to move away from the GUI because of this major problem: When batch printing to either PDFCreator or CutePDF it truncates the autofilled pdf filename. This requires you to manually type in the rest of the matching filename. When it comes to batch printing 30 or 40 dc files this gets to be a huge headache.

By sending files to the PDFCreator via the vbscript, I do not encounter this truncating error (note: the free version of CutePDF I have does not allow for command line interaction).

Make sense?

JJG

Yes, that make sense.

Note that myself, to not manually type the matching filename, and without type error (please), I first clic two times on the filename (in Windows file directory, and not "double clic") to be able to change or copy (with the help of copy and paste) the complete full filename of the file, then paste it in PdfCreator when asked.
Easy to do, without risk of error.
:)

landonairey

     Right that's typically the case, with CutePDF you can backspace one character in the save as menu and it auto fills to the matching dc file name, and your method is do able for PDFCreator. However, that recurring manual step is what I wish to eliminate.
     In the PDFCreator I know you can set an AutoSave option to rattle through multiple files and convert all of them. There is a setting which let's you specify the auto naming token and you can set the pdfs to be saved as the original dc filenames. This works great except it truncates the pdf name to 31 characters in length. With a vbscript I can set up those autosave features and it doesn't truncate the filename when I convert multiple files. The ONLY roadblock now is that I cannot put a dc file through the script because somehow can't convert it to PDF. However, like I said before, I can manually print to PDFCreator from within designcad and it can convert to a PDF just fine. Have you experienced anything like this?

Does this make sense? I want to make sure I'm being clear enough.

JJG

you are clear enough, but I have not yet experimented.
I have no experience in vbscript, sorry.

landonairey

Thanks for the thought anyways!

If you were interested in using this automation for your own purposes check out this link:
http://intranet.library.arizona.edu/users/pdfcreator/COM/Samples/Windows%20Scripting%20Host/VBScripts/Convert2PDF.vbs

Save it as somefilename.vbs To use it, drag n drop files to the vbscript in a windows explorer and a pdf copy of each file will soon be created. The code itself is relatively easy to follow, the settings that get established are pretty much word for word what you find in the PDFCreator GUI.

Happy coding, Cheers

JJG