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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Wildfire 4 - JLink - Export Drawing as PDF

ptc-5207919
1-Newbie

Wildfire 4 - JLink - Export Drawing as PDF

I've been looking through the api documentation on JLink and can't find anything pertaining to this. I'm trying to export a drawing as a PDF programmatically. I looked for methods exposed in the api to accomplish this but nothing. Did I miss this or is this functionality not possible? I know you can use a trail file.

The intention is to export a batch of drawings to PDFs. Anywhere from a few drawings to a few hundred drawings, all at once. A little help is appreciated!

5 REPLIES 5

Christopher,

just a tip ...

If you can print using J-Link and you know how to use printer configuration files (.pcf), then you can output Postscript file and convert it into PDF using Ghostscript's conversion batch file (ps2pdf.bat).

I used this procedure in the past to enable ProE users to get PDF file from ProE drawing.

Good luck.

Martin Hanak


Martin Hanák

See page 317 in the jlinkug.pdf "Exporting to PDF and U3D"

Hello,

CrossManager can do conversions from ProE drawings to PDF and it supports batch conversion : http://www.datakit.com/cad-convertors/proe-creo-parametric-2d-to-pdf-2d/60-73-0.html

Hi, Christopher Mhley.

Have you ever worked it out? Instead of exporting drawing as pdf, I wonder whether you have tried to convert pdf files to other formats, such as ppt, docs. Or to convert pdf to image formats? As for myself, I am testing the related PDF to PNG converting , PDF to BMP converting , and PDF to JPG converting programs these days. Do you have experience about it? Any suggestion will be appreciated. Thanks in advance.

Best regards,

Pan

ddhini
14-Alexandrite
(To:ptc-5207919)

PDFOption MyPdfOption_Launcher = pfcExport.PDFOption_Create();
 MyPdfOption_Launcher.SetOptionType(PDFOptionType.PDFOPT_LAUNCH_VIEWER);
 MyPdfOption_Launcher.SetOptionValue(pfcArgument.CreateBoolArgValue(false));        
 Myoptions.append(MyPdfOption_Launcher);
 Mypdfexportinstructions.SetOptions(Myoptions);//null is default
//Load Drawing Files....

				
String modelLocation=""+Workingdr+"\\";
String drw_name = ""+drawfiles[i]+".drw";
ModelDescriptor desc1 = pfcModel.ModelDescriptor_Create(ModelType.MDL_DRAWING, drw_name, null);
desc1 = pfcModel.ModelDescriptor_CreateFromFileName(drw_name);
desc1.SetPath (modelLocation);
draw=(Drawing)curSession.RetrieveModelWithOpts(desc1, pfcSession.RetrieveModelOptions_Create());
//Get total number of Sheets..
int nooffiles=draw.GetNumberOfSheets();
for(int no=1;no<=nooffiles;no++)
 {
  draw.SetCurrentSheetNumber(no);
  draw.Display();
 draw.Export(""+draw.GetFullName()+"-"+no+"", Mypdfexportinstructions);
continue;
}
//draw.Export(draw.GetFullName(), Mypdfexportinstructions);

ptc-5207919-Please look on this .This may helpful for what u looking.

Top Tags