专业化管理 > 支持可视化和发布 > WVS 加载程序 > WVS Adobe Experience Manager 服务器集成 > Adobe Experience Manager PDF 转换实用程序
  
Adobe Experience Manager PDF 转换实用程序
Adobe Experience Manager PDF 转换实用程序是一种批量转换实用程序,允许您向与 Windchill 中的“表示”关联的 PDF 文件添加 Reader Extensions。要开始使用该实用程序,必须使用 Adobe Experience Manager 服务器配置 Windchill Visualization Services (请参阅上面的配置 Adobe Experience Manager 服务器)。开始之前,请调用该实用程序的命令行帮助,并审阅所有的可用选项。要显示此帮助,可从 Windchill shell 中执行以下命令:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility -help
运行该实用程序,包括执行“标记”和“处理已标记文件”操作。
标记 – 第一个步骤是执行标记过程,在系统中特定的 PDF 文件上标记指示符。标记指示符可指定执行“处理已标记文件”操作时,对 Adobe Experience Manager 服务器将要处理的 PDF 文件,以应用 Reader Extensions。此步骤将标记在执行第二个步骤“处理已标记文件”时,系统中 Experience Manager 服务器要处理的 PDF 文件,以应用 Reader Extensions。要标记与 Windchill 系统中的“表示”关联的所有 PDF 文件,应从 Windchill shell 中调用以下命令:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility -mark
-username=<site username> -password=<site password>
“标记”操作支持额外的命令行自变量来标记特定容器中的 PDF 文件,或是基于修改时间戳标记 PDF 文件。例如,要标记与 "Demo Organization" 中的“表示”关联的所有 PDF 文件,应从 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”
要标记 "Demo Organization" 下 <my_product> 产品中的所有 PDF 文件,应从 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”
要标记 Windchill 系统中具有某个范围内的修改时间戳的所有 PDF 文件,应从 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
处理已标记文件 – 第二步是使用实用程序将系统中所有已标记的 PDF 发送至已配置的 Adobe Experience Manager 服务器,以便进行处理。最终结果是启用带有 Reader Extensions 的 PDF 文件,并从转换的 PDF 文件中移除标记指示符。“处理已标记文件”操作支持多线程,可将多个 PDF 文件发送至已配置的 Adobe Experience Manager 服务器。需相应调节 Adobe Experience Manager 服务器,以便同时支持多个转换 PDF 文件的请求。要使已配置的 Adobe Experience Manager 服务器处理所有已标记的 PDF 文件,应从 Windchill shell 中调用以下命令:
windchill com.ptc.wvs.server.util.livecycle.LiveCyclePDFConversionUtility
-process_marked-username=<site username> -password=<site password>
处理已标记的 PDF 文件时,“方法服务器”日志中将出现日志消息,显示转换的整个过程。如果转换失败,将在“方法服务器”日志中显示一条消息,描述在 Windchill 系统中标识该 PDF 文件的所有必要信息。以下为“方法服务器”日志中显示的失败转换的示例,其中 PDF 文件不允许页面修改:
[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.;
可通过在执行转换的 Windchill shell 中执行 Ctrl + C 来中止“处理已标记文件”操作。执行 Ctrl + C 后,将花费 30 秒来中止转换。转换中止后,实用程序将显示一些常规统计信息,列出在该时间段处理了多少 PDF 文件。对于确定文件大小的增加程度以及处理大量 PDF 文件所需花费的时间来说,该信息非常有帮助。以下是中止转换时显示内容的示例:

*****************************************
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).