Expand my Community achievements bar.

PDF Generator ES - createPDF operation PDF to PDF conversion

Avatar

Level 2

I need to create a LiveCycle ES process that takes an input PDF and generates an ouput PDF of specified properties.

The properties of the desired output PDF are specified by passing String parameters (such as the name of FileTypeSettings, PDF Settings and Security Settings) to the LiveCycle ES process.

My process currently uses GeneratePDFService's createPDF operation to do the conversion.

But I notice that if I use FileTypeSettings="Standard", the conversion of PDF to PDF fails with an exception*.

On the otherhand, if I use FileTypeSettings="Standard OCR", then the conversion succeeds.

It looks like, LiveCycle ES wants the FileTypeSettings\Image to PDF\Use OCR option to be checked.

Why is that?

If the input file is a PDF format, why does LiveCycle ES think it is an image file? Why do I have to select "Use OCR" under Image to PDF settings?

Is this a bug in LiveCycle ES and ES2?

My input PDF has only text in it. OCR (Optical Character Recognition) is not necessary as there are no images in my input PDF files.

I am easily able to search and highlight text in my input PDF from Acrobat or Reader. So it puzzles me why LiveCycle ES thinks the input is an image!

Some of the business cases for PDF to PDF conversion are:

+ User wants a large number of legacy PDF files of 1.3 or 1.4 version to be converted to PDF files of version 1.6

+ User wants a large number of unsecured PDF files to be secured with open/permission password.

Thanks

* Below is the error/exception seen in the LCES SystemOut when you use a FileTypeSetting without "Use OCR":

[3/11/11 14:45:19:493 EST] 000000e4 GeneratePDFIm A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-000-
Job ID for the submitted createPDF job =File.sm imported pdf2 (text only).pdfde9b9d-a6ffed-cdcc34-68a2a4-118d9f-48bf44
[3/11/11 14:45:19:618 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-024-File.sm imported pdf2 (text only).pdf: Time Job Submitted: 3/11/11 2:45 PM for job = File.sm imported pdf2 (text only).pdfde9b9d-a6ffed-cdcc34-68a2a4-118d9f-48bf44
[3/11/11 14:45:19:618 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-017-File.sm imported pdf2 (text only).pdf: Job Submitted by User: usersystemcontext
[3/11/11 14:45:19:618 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-016-File.sm imported pdf2 (text only).pdf: Job Type: Convert to PDF
[3/11/11 14:45:19:634 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-022-File.sm imported pdf2 (text only).pdf: Security Settings Used: No Security
[3/11/11 14:45:19:634 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-023-File.sm imported pdf2 (text only).pdf: FileType Settings Used: Standard
[3/11/11 14:45:19:634 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-028-File.sm imported pdf2 (text only).pdf: Job Completion Status: Failed
[3/11/11 14:45:19:650 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-025-File.sm imported pdf2 (text only).pdf: Time Job Completed: 3/11/11 2:45 PM for job = File.sm imported pdf2 (text only).pdfde9b9d-a6ffed-cdcc34-68a2a4-118d9f-48bf44
[3/11/11 14:45:19:650 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-030-File.sm imported pdf2 (text only).pdf: Waiting time in queue: 0 ms for job = File.sm imported pdf2 (text only).pdfde9b9d-a6ffed-cdcc34-68a2a4-118d9f-48bf44
[3/11/11 14:45:19:650 EST] 000000e4 BMCCaller A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-026-File.sm imported pdf2 (text only).pdf: Time of Job Execution: 109 ms for job = File.sm imported pdf2 (text only).pdfde9b9d-a6ffed-cdcc34-68a2a4-118d9f-48bf44
[3/11/11 14:45:19:650 EST] 000000e4 GeneratePDFIm E com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-000-ALC-PDG-001-018-You submitted a PDF file for conversion without enabling OCR in file-type settings. This operation is invalid.
[3/11/11 14:45:19:665 EST] 000000e4 GeneratePDFIm A com.adobe.pdfg.logging.PDFGLogger log ALC-PDG-001-000-Conversion failed : ALC-PDG-001-018-You submitted a PDF file for conversion without enabling OCR in file-type settings. This operation is invalid.
[3/11/11 14:45:19:665 EST] 000000e4 AWS W com.adobe.workflow.engine.SynchronousBranch Method name : handleInvokeAction message is : ALC-PDG-001-018-You submitted a PDF file for conversion without enabling OCR in file-type settings. This operation is invalid. ALC-PDG-1018-000: com.adobe.livecycle.generatepdf.client.FileFormatNotSupportedException: ALC-PDG-001-018-You submitted a PDF file for conversion without enabling OCR in file-type settings. This operation is invalid.
at com.adobe.pdfg.Native2PdfCaller.callNativeBMC(Native2PdfCaller.java:854)
at com.adobe.pdfg.Native2PdfCaller.createPDF(Native2PdfCaller.java:384)
at com.adobe.pdfg.GeneratePDFImpl.createPDFInternal(GeneratePDFImpl.java:502)
at com.adobe.pdfg.GeneratePDFImpl.createPDFCommon(GeneratePDFImpl.java:281)
at com.adobe.pdfg.GeneratePDFImpl.createPDF2(GeneratePDFImpl.java:204)
at sun.reflect.GeneratedMethodAccessor716.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:118)
at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.intercept(DocumentPassivationInterceptor.java:53)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)

..............

.........

....

[3/11/11 14:45:19:712 EST] 000000e4 AWS E com.adobe.workflow.engine.PEUtil logFailedFaultRouting An exception was thrown with name com.adobe.livecycle.generatepdf.client.FileFormatNotSupportedException message:ALC-PDG-001-018-You submitted a PDF file for conversion without enabling OCR in file-type settings. This operation is invalid. while invoking service GeneratePDFService and operation CreatePDF2 and no fault routes were found to be configured.
[3/11/11 14:45:19:712 EST] 000000e4 AWS W com.adobe.workflow.engine.SynchronousBranch Method name : handleFault message is : ALC-PDG-001-018-You submitted a PDF file for conversion without enabling OCR in file-type settings. This operation is invalid. ALC-PDG-1018-000: com.adobe.livecycle.generatepdf.client.FileFormatNotSupportedException: ALC-PDG-001-018-You submitted a PDF file for conversion without enabling OCR in file-type settings. This operation is invalid.
at com.adobe.pdfg.Native2PdfCaller.callNativeBMC(Native2PdfCaller.java:854)
at com.adobe.pdfg.Native2PdfCaller.createPDF(Native2PdfCaller.java:384)
at com.adobe.pdfg.GeneratePDFImpl.createPDFInternal(GeneratePDFImpl.java:502)
at com.adobe.pdfg.GeneratePDFImpl.createPDFCommon(GeneratePDFImpl.java:281)
at com.adobe.pdfg.GeneratePDFImpl.createPDF2(GeneratePDFImpl.java:204)
at sun.reflect.GeneratedMethodAccessor716.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:118)

2 Replies

Avatar

Level 2

Hi,

I don't know exactly why they require OCR for the conversion, but it isn't really anything to worry about, and you can create your own profile to convert to pdf 1.6 and select OCR. If you still need to convert without OCR, you can do the following:

Convert the pdf to postscript by using the service toPS, and then use createPDF to convert from postscript to pdf using any profile you want, and you won't be required to use OCR.

Hope this helps.

Avatar

Level 2

I think the reason of requiring OCR selected is that PDF-G is supposed to be used to convert other file formats to PDF. The only thing it is designed to deal with PDF is converting image based PDF to text based one (i.e. OCR). I think your requirments of upgrading PDF version make sense though. If there's no other components can fulfill this, it'll be a good enhancement.

Regarding your second requirement: secure PDF, you may also have a look at LC Assemble service.