1

我们正在使用 Adob​​e LiveCycle ConvertPDF 服务转换大型 PDF 文件。

这适用于较小的 PDF 文件,但当我们尝试转换较大的 PDF 文件(大约 150mb - 不要问)时会失败。

看起来 Adob​​e 将事务超时设置为 14(?)分钟左右。由于我们巨大的 PDF 的处理时间超过了这个时间,操作被中止。我们尝试了多个 PDF,因此这不太可能是由损坏的输入文件引起的。

这是异常产生的输出:

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)
    [...]

到目前为止 - 似乎合乎逻辑。

但是,我找不到配置事务长度的位置。我想如果我们将超时时间增加到 30 分钟左右,我们的问题就会消失。(如果我们能够在没有任何事务的情况下调用此操作,问题也会消失......)

假设我们只是像这样运行它:

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"))

但是,要么我们没有正确设置 ServiceClientFactory,要么没有正确读取 JBoss 配置,我们无法找到延长事务寿命的方法。(交易时间真的是问题吗?)

4

2 回答 2

1

在 LiveCycle 管理控制台中,只需转到主页 > 服务 > 应用程序和服务 > 服务管理 > ConvertPdfService

服务超时可以在那里更改。

当使用包含 39k 页(初始 13 个,每个克隆 3000 次,大小 ~15Mb)的转换 pdf(由 iText 生成)进行测试时,最终输出的 PostScript 文件为 ~1,25Gb。整个工作大约花了2个小时。但它起作用了,没有问题。

(我想这个答案使这个问题与编程无关,但是嘿。)

于 2009-03-13T15:11:08.540 回答
1

LiveCycle 产品博客中的此条目也可能有所帮助:http: //blogs.adobe.com/livecycle/2008/10/livecycle_processing_big_docum.html

于 2009-08-30T17:10:55.790 回答