views:

680

answers:

2

We are converting large PDF file using Adobe LiveCycle ConvertPDF service.

This works fine for smaller PDF files, but fails when we attempt to convert a large PDF file (around 150mb - don't ask).

It looks like Adobe sets the a transaction timeout around 14(?) minutes. As processing time for our huge PDF exceeds this time, operation is aborted. We tried multiple PDFs, so this is not likely to be caused by corrupted input file.

Here's the output that exception produces:

com.adobe.livecycle.convertpdfservice.exception.ConvertPdfException: ALC-DSC-000-000: com.adobe.idp.dsc.DSCException: Internal error.
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2WithSMT(ConvertPdfServiceImpl.java:117)
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2(ConvertPdfServiceImpl.java:93)
    [...]
Caused by: ALC-DSC-000-000: com.adobe.idp.dsc.DSCException: Internal error.
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl$1.doInTransaction(ConvertPdfServiceImpl.java:110)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew(EjbTransactionBMTAdapterBean.java:218)
    [...]
Caused by: com.adobe.livecycle.convertpdfservice.exception.ConvertPdfException: Cannot convert PDF file to PostScript. 
Exception: "Transaction timed out: Couldn't connect to Datamanager Service"
    at com.adobe.convertpdf.ConvertPdfBmcWrapper.convertPdftoPs(ConvertPdfBmcWrapper.java:207)
    at com.adobe.convertpdf.ConvertPdfServer.convertPdftoPs(ConvertPdfServer.java:121)
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2InTxn(ConvertPdfServiceImpl.java:129)
    [...]

So far - seems logical.

However, I can't find where the transaction length is configured. I guess if we increased the timeout to something like 30 minutes, our problem would go away. (Also the problem would go away if we had way of invoking this operation without any transactions...)

Let's say we are simply running it like this:

ServiceClientFactory factory = com.adobe.idp.dsc.clientsdk.ServiceClientFactory.createInstance(connectionProps);

ConvertPdfServiceClient convertPDFClient = new com.adobe.livecycle.convertpdfservice.client.ConvertPdfServiceClient(factory);

// ... set-up details skipped ...
com.adobe.idp.Document result_postscript = convertPDFClient.toPS2(inPdf,options);
result_postscript.copyToFile(new File("c:/Adobe/output.ps"))

However, either we are not setting up ServiceClientFactory correctly, or maybe not reading JBoss config properly, we can't find way to make the transaction live longer. (Is the transaction time to live really the issue?)

+1  A: 

In LiveCycle Administration Console simply go to Home > Services > Applications and Services > Service Management > ConvertPdfService

The service timeout can be changed there.

When testing with converting pdf (generated by iText) that contains 39k pages (13 initial, each cloned 3000 times, size ~15Mb) -final output PostScript file was ~1,25Gb. Whole work took about 2 hours. But it worked, no problems.

(I guess this answer makes the question not-programming related, but hey.)

Valters Vingolds
+1  A: 

This entry in the LiveCycle Product Blog might also help: http://blogs.adobe.com/livecycle/2008/10/livecycle%5Fprocessing%5Fbig%5Fdocum.html

Jayan Kandathil