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

Jlink: Export to PDF with PDFExportInstructions.SetProfilePath()

ThomasStep
5-Regular Member

Jlink: Export to PDF with PDFExportInstructions.SetProfilePath()

Hello,

I want to export a drawing to PDF with Jlink. Here is my code:
PDFExportInstructions exportInstructionsPDF = pfcExport.PDFExportInstructions_Create();
drawing.Export("my_test_file", exportInstructionsPDF);
To set the PDF options, I would like to use the function SetProfilePath():
exportInstructionsPDF.SetProfilePath("C:/myPath/my_profile_file");

But I have no information about the format of the profile file.
Does anyone have the information for this file and the complete PDF options for Creo1, Creo2 and Creo3?

Thank you for your hints Thomas

1 ACCEPTED SOLUTION

Accepted Solutions
ThomasStep
5-Regular Member
(To:ThomasStep)

I set my password in the following way:

                 pdfOption = pfcExport.PDFOption_Create();
        pdfOption.SetOptionType(PDFOptionType.PDFOPT_PASSWORD_TO_OPEN);
        pdfOption.SetOptionValue(pfcArgument.CreateStringArgValue(myPassword));
        pdfOptions.append(pdfOption);

and all other parameters in a similar way.

 

And now I don't use        
exportInstructionsPDF.SetProfilePath("C:/myPath/my_profile_file")

Thank your for your help Thomas

View solution in original post

7 REPLIES 7

Hi,

 

how to get profile file ? Launch Creo, open drawing, Save As *.pdf. In PDF Export Settings dialog box set requested options and click Save button to create file with .dop extension.


Martin Hanák
ThomasStep
5-Regular Member
(To:MartinHanak)

Hello,

That's what I wanted. Thank you.

But I can't find the XML attributes for the following export settings in my profile file my_test_profile.dop (see below):
a) General --> Sheets --> All||Current||Range (see PDF Export Settings in pdf_export_settings_general.png)
b) Security --> Password/Confirm (see PDF Export Settings in pdf_export_settings_security.png)

Where can I find these settings?
Thank's Thomas

 

my profile file my_test_profile.dop:

<XML_DOCUMENT xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <PTC_HEADER>
        <VENDOR>Parametric Technology Corporation</VENDOR>
        <PRODUCT>Creo Parametric 3402016130</PRODUCT>
        <XML_VERSION>1.0</XML_VERSION>
        <HOST_NAME>XXXX</HOST_NAME>
        <USER>xxx</USER>
        <MACHINE_TYPE> Intel64 Family 6 Model 42 Stepping 7  GenuineIntel  3093 MHz</MACHINE_TYPE>
    </PTC_HEADER>
    <IntfProfile export="1" pointer="TRUE">
        <settings pointer="TRUE">
            <PDFConfig_Profile TITLE="my test title"
                               AUTHOR=""
                               LINECAP="0"
                               SUBJECT=""
                               pointer="TRUE"
                               KEYWORDS=""
                               LINEJOIN="0"
                               PENTABLE="0"
                               HYPERLINKS="1"
                               PAGE_WIDTH="0."
                               RASTER_DPI="300"
                               TOP_MARGIN="0."
                               VIEW_INDEX="0"
                               LEFT_MARGIN="0."
                               MODIFY_COPY="1"
                               PAGE_HEIGHT="0."
                               EXPORT_VIEWS="1"
                               MODIFY_PRINT="1"
                               PDFLayerMode="1"
                               ENGLISH_UNITS="1"
                               LAUNCH_VIEWER="0"
                               MODIFY_CHANGE="0"
                               PDFColorDepth="0"
                               PDFRenderMode="7"
                               BOOKMARK_VIEWS="1"
                               BOOKMARK_ZONES="1"
                               ProPDFSaveMode="16"
                               BOOKMARK_SHEETS="1"
                               PDFLightingMode="9"
                               PDFPrintingMode="1"
                               SEARCHABLE_TEXT="1"
                               PDFParameterMode="0"
                               ProPDFExportMode="0"
                               ProPlotPaperSize="0"
                               PDFFontStrokeMode="1"
                               PDFHiddenLineMode="1"
                               BOOKMARK_FLAGNOTES="1"
                               PDFPageOrientation="1"
                               MODIFY_ACCESSIBILITY="1"
                               PDFRestrictOperationsMode="0">
                <RGB SOAP-ENC:Array="[3]">
                    <entry>1.</entry>
                    <entry>1.</entry>
                    <entry>1.</entry>
                </RGB>
            </PDFConfig_Profile>
        </settings>
    </IntfProfile>
</XML_DOCUMENT>

Hi,

 

I created a drawing with 3 sheets and set Range 1-2 in dialog box.

.dop file contains following lines:

<SHEETS SOAP-ENC:Array="[2]">
<entry>1</entry>
<entry>2</entry>
</SHEETS>

To understand sheet management, you have to experiment little bit ...

 

In case of password, I do not expect that this information can be set in .dop file ...

 

If you have additional questions, try asking PTC Support.


Martin Hanák
ThomasStep
5-Regular Member
(To:MartinHanak)

Hello Martin,

I experimented with the settings 'General --> Sheets --> All||Current||Range', but I have always looked at the tag PDFConfig_Profile. I need stronger glasses 😉

In case of password: When I run a self created trail file, I can set these security settings.

Thank you for your help
Thomas

ThomasStep
5-Regular Member
(To:ThomasStep)

I set my password in the following way:

                 pdfOption = pfcExport.PDFOption_Create();
        pdfOption.SetOptionType(PDFOptionType.PDFOPT_PASSWORD_TO_OPEN);
        pdfOption.SetOptionValue(pfcArgument.CreateStringArgValue(myPassword));
        pdfOptions.append(pdfOption);

and all other parameters in a similar way.

 

And now I don't use        
exportInstructionsPDF.SetProfilePath("C:/myPath/my_profile_file")

Thank your for your help Thomas

Hi,

 

should I understand your last reply as a question? Or is it information ?


Martin Hanák
ThomasStep
5-Regular Member
(To:MartinHanak)

Hello Martin,

as an information.

Greetings Thomas

 

Top Tags