Adding PDF As Secondary Content
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 );
}

