Skip to main content
1-Visitor
May 2, 2007
Question

ProPDFExport()

  • May 2, 2007
  • 1 reply
  • 866 views
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-Visitor
    May 3, 2007
    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.