Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi Mark,
I think your problem is caused due to the declaration of MyPDFOptions as a pointer whereas it should be a ProPDFOptions variable.
So if you change your code to:
ProPDFOptions MyPDFOptions;
ProPDFoptionsAlloc( &MyPDFOptions);
....
it should work.
I got a very similar piece of code that works without problems:
ProPDFOptions PDFoptions;
err = ProPDFoptionsAlloc(&PDFoptions);
err = ProPDFoptionsIntpropertySet(PDFoptions, PRO_PDFOPT_COLOR_DEPTH, PRO_PDF_CD_MONO);
err = ProPDFoptionsBoolpropertySet(PDFoptions, PRO_PDFOPT_LAUNCH_VIEWER, PRO_B_FALSE);
err = ProPDFExport (model, w_pdfpath, PDFoptions );
err = ProPDFoptionsFree (PDFoptions);
Best regards,
Jan
AGFA Graphics NV
Belgium
In Reply to Mark Steffke:
Does anyone have any sample code for using ProPDFExport they'd be
willing to share. There is no sample code, and I'm having some trouble
with the option. Or maybe someone can just see what I'm missing here.
The function is returning me -2 (Bad Inputs. ) Here is a condensed
version of my setup and funtion call. The intention is to set these two
options and take the default on the rest. FilenameW and mdlDrawing
arguments are fine, it's the options that is invalid. I am somehow not
setting up the ProPDFOptions correctly.
ProPDFOptions *MyPDFOptions;
ProPDFoptionsAlloc(MyPDFOptions);
ProPDFoptionsIntpropertySet(MyPDFOptions, PRO_PDFOPT_FONT_STROKE,
PRO_PDF_STROKE_ALL_FONTS);
ProPDFoptionsIntpropertySet(MyPDFOptions, PRO_PDFOPT_COLOR_DEPTH,
PRO_PDF_CD_MONO);
fprintf(fp,"%s\n",Path);
ProStringToWstring(fileNameW, Path);
tkerr = ProPDFExport (mdlDrawing, fileNameW, MyPDFOptions);
Thanks,
Mark Steffke
Engineering System Administrator
The Delfield Company
Manitowoc Foodservice
T 989.775.9215 or 989.773.7981, ext 12484
Integrity, Commitment to Stakeholders, and Passion for Excellence