Specialized Administration > Supporting Visualization and Publishing > WVS Loader > WVS Adobe Experience Manager Server Integration > Adobe Experience Manager PDF Conversion Utility
  
Adobe Experience Manager PDF Conversion Utility
The Adobe Experience Manager PDF Conversion Utility is a bulk conversion utility that allows you to add Reader Extensions to PDF files associated to Representations in Windchill. To begin using the utility, Windchill Visualization Services must be configured with an Adobe Experience Manager server (see Configuring an Adobe Experience Manager Server, above). Before you begin, invoke the command line help for the utility and review all the available options. To display the help, execute the following command in a Windchill shell:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility -help
Running the utility consists of performing the “Mark” and “Process Marked” operations.
Mark – The first step is to perform a marking process that stores a marking indicator on specific PDF files in the system. The marking indicator identifies the PDF to be processed by an Adobe Experience Manager server to have Reader Extensions applied when performing the “Process Mark” operation. This step marks PDF files in the system that is processed by an Experience Manager Server to have Reader Extensions applied when performing the second step, Process Marked. To mark all PDF files associated to a Representation in the Windchill system, invoke the following command in a Windchill shell:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility -mark
-username=<site username> -password=<site password>
The Mark operation supports additional command line arguments for marking PDF files in specific containers, or to mark PDF files based on the modification timestamp. For example, to mark all PDF files associated to a Representation in the “Demo Organization,” invoke the following command in a Windchill shell:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility -mark
-username=<site username> -password=<site password>
-cont_path=”wt.inf.container.OrgContainer=Demo Organization”
To mark all PDF files in the <my_product> product under the “Demo Organization,” invoke the following command in a Windchill shell:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility -mark
-username=<site username> -password=<site password>
-cont_path=”wt.inf.container.OrgContainer=Demo Organization\
wt.pdmlink.PDMLinkProduct=MY_PRODUCT”
To mark all PDF files in the Windchill system that have a modification timestamp between a range, invoke the following command in a Windchill shell:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility -mark
-username=<site username> -password=<site password>
-from=08/12/2012 -to=11/12/2012
Process Marked – The second step is to have the utility send all marked PDF files in the system to a configured Adobe Experience Manager server to be processed. The end result is a PDF file with Reader Extensions enabled, and the marker indicator removed from the converted PDF file. The Process Marked operation supports multiple threads sending PDF files to a configured Adobe Experience Manager server. The Adobe Experience Manager server needs to be tuned appropriately to support multiple requests to convert PDF files simultaneously. To have all marked PDF files processed by a configured Adobe Experience Manager server, invoke the following command in a Windchill shell:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility
-process_marked-username=<site username> -password=<site password>
When processing marked PDF files, log messages appear in the Method Server log showing the overall progress of the conversion. If a conversion fails, a message is displayed in the Method Server log describing all the information necessary to identify the PDF file in the Windchill system. The following is an example of a failed conversion displayed in the Method Server log in which the PDF file did not allow for page modification:
[Begin processing batch #1] - Size=10
Exception: ApplicationData=wt.content.ApplicationData:118012 (Cant_Modify_Set.pdf)
DerivedImage=wt.viewmarkup.DerivedImage:118010 (cant_modify)
Representable=wt.part.WTPart:118006 (0000000099, cant_modify, A.1)
Container=wt.pdmlink.PDMLinkProduct:84802 (ProductView Demo)

Caused by: javax.xml.ws.soap.SOAPFaultException: com.adobe.livecycle.assembler.client.ProcessingException: ALC-ASM-S00-002:
Failed to execute the DDX - error messages provided.
Caused by: com.adobe.internal.pdfm.content.FormXObjectServiceException: PDFM_S06016:
Apply Watermark operation failed due to permissions on document "inDoc".
Caused by: com.adobe.internal.pdfm.util.PDFMPermissionException: PDFM_S00014: PAGE_MODIFY permission is required for this operation.;
The Process Marked operation can be aborted by performing Ctrl + C in the Windchill shell that executed the conversion. After executing Ctrl + C, it takes about 30 seconds for the conversion to abort. After the conversion aborts, the utility displays some general statistics, listing how many PDF files were processed during that time period. This information can be useful in determining how much of an increase in file size occurs, and how long it takes to process a number of PDF files. The following is an example of what is displayed when aborting a conversion:

*****************************************
Interrupting conversion - please wait
*****************************************
The LiveCycle PDF Conversion Utility has been interrupted. Conversions currently
executing have been interrupted and awaiting conversions have been aborted.


LiveCycle PDF Conversion has completed.
Total execution time: 1.248 minutes(s)
Average time to perform a single conversion: 14.762 second(s)
Number of PDFs successfully converted: 14
Number of failed conversions: 5
Number of timed out conversions: 0
Total file size of all PDFs before conversion: 2659.06 KB
Total file size of all PDFs after conversion: 3358.94 KB
Total file size increase: 699.88 KB
Percentage of total file size increase: %20.84
Average filesize increase per PDF: 49.99 KB

There are 18 remaining marked PDF file(s).