cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

ProPDFExport()

JohnMattson
2-Explorer

ProPDFExport()

This electronic message including any attachments ("Message") may
contain information that is privileged, confidential and/or exempt from
disclosure under trade secret and other applicable law. If you are not
the intended recipient, notify the sender immediately, permanently
delete all copies of this Message, and be aware that examination, use,
dissemination, duplication or disclosure of this Message is strictly
prohibited.
1 REPLY 1

john,
i've written a test syncronous sample for creating pdf.
this is an abstract

#include <propdf.h>

ProPDFOptions opzioniPDF;

err = ProPDFoptionsAlloc ( &opzioniPDF );
PROE_STATUS(funcName, "ProPDFoptionsAlloc()", err);

err = ProPDFoptionsIntpropertySet ( opzioniPDF,
PRO_PDFOPT_COLOR_DEPTH, PRO_PDF_CD_MONO );
PROE_STATUS(funcName,
"ProPDFoptionsIntpropertySet(PRO_PDFOPT_COLOR_DEPTH)", err);

err = ProPDFoptionsBoolpropertySet ( opzioniPDF,
PRO_PDFOPT_LAUNCH_VIEWER, PRO_B_FALSE );
PROE_STATUS(funcName,
"ProPDFoptionsBoolpropertySet(PRO_PDFOPT_LAUNCH_VIEWER)", err);

sprintf ( pdf_name, "%s\\%s.pdf", directory, name );

remove ( pdf_name );

ProStringToWstring ( wPdf_name, pdf_name );
err = ProPDFExport ( mdl, wPdf_name, opzioniPDF );
PROE_STATUS(funcName, "ProPDFExport()", err);

err = ProPDFoptionsFree ( opzioniPDF );
PROE_STATUS(funcName, "ProPDFoptionsFree()", err);

this set the colors as b/w and disable the opening of acrobat after the export

for me it works fine.
there are many options to set, and the api reference explain how to set.

michele

At 20.
Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags