API: SaveAs4, how to save every sheet on separate PDF file?

Hi,

SaveAs4 (like SW as well) saves all drawing sheets into one file, but is there a way to have separate pdf files for every sheet?

regards Markku

Reply to
Markku Lehtola
Loading thread data ...

I'm not sure you can do it with the SaveAs4. You may need to use PrintOut2 instead.

Matt

Markku Lehtola wrote:

Reply to
fcsuper

PrintOut seems to give me just .prn files, and I need pdf's

Reply to
Markku Lehtola

Markku,

Sorry, I am used to having Adobe Acrobat Professional installed on my computer. With it, PDF Printer is an option as a printer. If you have Acrobat Professional installed, PrintOut2 would allow you to do what you ask. With that said, I highly recommend getting Acrobat Professional. :)

I'm sorry I do not know a solution using SaveAs4.

Matt

Markku Lehtola wrote:

Reply to
fcsuper

You can use free tools like FreeDist to turn .prn to pdf, but in this case it's not a solution.

Reply to
Markku Lehtola

Ok, getting somewhere with this one:

install GhostScript create .prn with ps printer driver translate prn to pdf like this:

Sub main()

Dim gspath As String Dim inputfile As String Dim outputfile As String Dim retval As Boolean Dim wholecommand As String

gspath = "C:\Program Files\gs\gs8.51\bin\gswin32c.exe" inputfile = "c:\temp\_pdfkoe\test 2.prn" outputfile = "c:\temp\_pdfkoe\test 2.pdf"

wholecommand = gspath & Chr(32) & "-sDEVICE#pdfwrite -dNOPAUSE -dQUIET

-dBATCH -sOutputFile#" & Chr(34) & outputfile & Chr(34) & Chr(32) & Chr(34) & inputfile & Chr(34)

retval = Shell(wholecommand)

End Sub

--------------

It's amazing how difficult PDF stuff is sometimes for SW and how easy it's to use free tools like GhostScript...

Reply to
Markku Lehtola

Mark, there's also an inexpensive program you can buy called Win2Pdf. It's a print driver that uses the windows print dialog to print desired pages.

Tony

Reply to
Tony

Printing should be done background without any dialogs etc. Got also this information:

If you are using 2007 sp1, "modeldoc2.saveas4" has been replaced with "modeldocext.saveas". This has options for exporting pdf files sheet by sheet.

Reply to
Markku Lehtola

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.