PDF transformation failed using content transformation services.
Hello All,
I am facing an issue while doing transformation of content into PDF using content transformation services from JMS server (auto activity)
" Could not check in document cts_submission_-512167467_optimizePDF_adts
Source Object Id must be set before using Transformation"
Same code is working fine using plain DFC class. Please find the attached log for the issue details.
The environment details:
Content Server v6.7 Sp1 Patch 10
ADTS Server v6.7 Sp1 Patch 10
Thank you!!
-JitenK
Comments
-
are you using custom code to generate the request? could you post that code? It looks like you could be missing some parameter.
0 -
Try with this code: (this takes a doc document, converts it to pdf, and versions the object so the PDF is the primary content with setVersionUp)
String strOid="09...";
DfId oid=new DfId(strOid);
IDfSysObject obj=(IDfSysObject)session.getObject(oid);
IMediaProfile[] profiles = null;
IProfileService profService=(IProfileService)client.newService(IProfileService.class.getName(), manager);
profiles = profService.getProfiles(session,"msw8",oid.toString(), null);
IMediaProfile supportedTransformation =null;
for(int i = 0; i < profiles.length && supportedTransformation == null; i++) {
if(profiles[i].getObjectName().equals("custom_document_to_pdf")) {
supportedTransformation = profiles[i];
}
}
ICTSService ctsService=(ICTSService)client.newService(ICTSService.class.getName(), manager);
if(ctsService.isCTSServiceAvailable(session)) {
ICTSRequest request = (ICTSRequest)ctsService.getNewTransformRequest(session);
request.setSourceObjectId(oid.toString());
request.setSourceFormat("msw8");
request.setPriority(1);
request.setParameters(supportedTransformation.getParameters());
request.setMediaProfileName("custom_document_to_pdf");
request.setMediaProfileLabel("Convert to pdf");
request.setTargetFormat("pdf");
request.setTargetPage(0);
request.setTargetPageModifier("");
request.setSourcePage(0);
request.setSourcePageModifier("");
request.setMediaProfileId(supportedTransformation.getObjectId().getId());
request.setTitle("TestDocPDF");
request.setLocale(Locale.getDefault());
request.setVersionUp(true);
request.save();
System.out.println("\nTransform Request " + request.getObjectId());
System.out.println("Is transform request valid? " + request.isValid());
boolean notifyUser = false;
boolean synchronizeCmd =false;
boolean deleteOnCompletion = true;
System.out.println("Submitting request for transformation...");
ctsService.submitRequest(session, request, notifyUser, synchronizeCmd, deleteOnCompletion);
System.out.println("Submitted request for rendition");0 -
Thank you for the source code.
Just for the understanding, Is there any issue with the my source code? This code is working fine on one environment from JMS and working fine when I am executing from through command prompt as java utility from both the environment.
There is one difference between your code i.e. the request is getting save prior to submit request call.
Thank you!!
0 -
Hello,
I am having the same problem with Media Transformation Service 6.7 SP2. Any ideas so far? If I use DFS and the transformation service, it works perfectly.
Best regards
Daniel.
0 -
Of course, answer is outdated, but could be helpful for others.
There are some complex nuances in TransformRequest.save() method related to self checkout+checkin+resave stuff.
The problem is that you are using wrong factory for TransformRequest object. Instead of ICTSAddJobService.getNewCTSRequest(String docbase) (who creates an object in a new session and releases it immediately) you should use ICTSService.getTransformationRequest(IDfSession session).
0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 101 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- XM Fax