Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I'm using the below workflow code to publish a drawing which gets associated as a product view representation. The representation is a pdf that's wrapped within the product view format. How can I get (or convert) the pvc file to a pdf so that I can programmatic added it as secondary content.
Thanks
String objRef = wt.fc.ObjectReference.newObjectReference(primaryBusinessObject).toString();
String lifecyclestate = ((wt.lifecycle.LifeCycleManaged) primaryBusinessObject).getState().toString();
String name =((wt.enterprise.RevisionControlled) primaryBusinessObject).getName() + "-" + lifecyclestate;
com.ptc.wvs.common.ui.Publisher pub = new com.ptc.wvs.common.ui.Publisher();
boolean sucess = pub.doPublish(false, true, objRef, (wt.vc.config.ConfigSpec)null, (wt.vc.config.ConfigSpec)null, true, name, name, com.ptc.wvs.common.ui.Publisher.EPM, null, 0);
if (sucess) {
String link = pub.getViewableLink();
System.out.println("---- Link --- " + link);
String repObjRef = pub.getViewableObjRef();
System.out.println(" ---- Ref Obj --- " + repObjRef );
}
It appears that the Windchill representations are wrapped into the product view format. Basically to open a PDF representation, I have to use product view which prevent us from programmatically adding it to the drawing as secondary PDF content and opening it using other tools such Adobe Acrobat. Any help would be great! - Thanks
Chris,
If your goal to be able to save the PDF from Windchill we are doing this by using Save Representation from the Actions menuon the listed Representation in the General/Representations detail page.