Frank Schnater Posted May 8, 2009 Share Posted May 8, 2009 hello all, for some time I'm trying to find out how the pdf procedures in vectorscript work: -AcquireExportPDFSettingsAndLocation -ClosePDFDocument -ExportPDFPages -OpenPDFDocument I tried some things, but nothing happens. The functionreference files are not very instructive. tia, Frank Schnater Quote Link to comment
Dieter @ DWorks Posted May 8, 2009 Share Posted May 8, 2009 They actually work togheter. I changed them to one procedure for easier use: PROCEDURE ExportToPDF(pages : DYNARRAY of STRING; inSeparateDocuments : BOOLEAN); VAR currentPage, pageResult : INTEGER; firstPage, lastPage : INTEGER; firstBook, lastBook : INTEGER; activeLayer : HANDLE; BEGIN IF AcquireExportPDFSettingsAndLocation(inSeparateDocuments) THEN BEGIN activeLayer := ActLayer; GetArrayDimensions(pages, firstPage, lastPage, firstBook, lastBook); IF inSeparateDocuments THEN BEGIN FOR currentPage := firstPage TO lastPage DO BEGIN IF OpenPDFDocument(pages[currentPage]) THEN BEGIN Layer(pages[currentPage]); pageResult := ExportPDFPages(pages[currentPage]); ClosePDFDocument; END; END; END ELSE BEGIN IF OpenPDFDocument('') THEN BEGIN FOR currentPage := firstPage TO lastPage DO BEGIN IF GetLayerByName(pages[currentPage]) <> NIL THEN BEGIN Layer(pages[currentPage]); pageResult := ExportPDFPages(pages[currentPage]); END; END; ClosePDFDocument; END; END; Layer(GetLName(activeLayer)); END; END; The pages variable is an array of layer names. Quote Link to comment
Frank Schnater Posted May 11, 2009 Author Share Posted May 11, 2009 hello Dworks, I'll see if I can get it to work now, thank you for your response, Frank Schnater Quote Link to comment
Hippocode Posted June 19, 2013 Share Posted June 19, 2013 Is it possible to choose the PDF name beforehand ? I tried it by changing the following: IF OpenPDFDocument(customnamehere?.pdf) THEN But that ain't the way Quote Link to comment
Dieter @ DWorks Posted June 20, 2013 Share Posted June 20, 2013 (edited) Is it possible to choose the PDF name beforehand ? I tried it by changing the following: IF OpenPDFDocument(customnamehere?.pdf) THEN But that ain't the way Your name must be a string, so enclose it with ' And I think that ? will not work in a filename. Edited June 20, 2013 by DWorks Quote Link to comment
Hippocode Posted June 20, 2013 Share Posted June 20, 2013 (edited) Yeah I did that, this wasn't my source code so it actually was ('filename.pdf'), yet it keeps using the active vw document name Edited June 20, 2013 by hippothamus Quote Link to comment
Dieter @ DWorks Posted June 20, 2013 Share Posted June 20, 2013 It could be a bug. I did this a long time ago and do not remember having that issue. Quote Link to comment
Hippocode Posted June 21, 2013 Share Posted June 21, 2013 It could be a bug. I did this a long time ago and do not remember having that issue. If its a bug its in version 2010,2011 and 2013. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.