java.lang.IllegalStateException:资源文件/ com / aspose / pdf / engine / commondata / text / cmaps / PredefinedCMaps /在程序集中找不到

时间:2017-08-14 08:54:31

标签: aspose.pdf

我正在尝试从pdf文件中搜索文本并获取页码。我的代码看起来像这样:

    DocumentUtil.applyAsposeWordLicense();
    DocumentUtil.applyAsposePdfLicense();
    com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(".....Kontoeroeffnung.pdf");
    // Accept the absorber for all the pages
    String localeTitle = Ivy.cms().findContentObjectValue(AbsDocumentConstant.BASIC_CONTRACT_TITLE, Locale.GERMAN).getContentAsString();
    TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber(String.format("(?i)%s", "Online-Kontoeröffnung"), new TextSearchOptions(true));
    pdfDocument.getPages().accept(textFragmentAbsorber);

但是我得到了这个例外,我试图弄清楚发生了什么,但是这个库是封闭源代码并且错误消息没有足够的信息:

Caused by: java.lang.IllegalStateException: Resource file /com/aspose/pdf/engine/commondata/text/cmaps/PredefinedCMaps/ not found in assembly
    at com.aspose.pdf.internal.p650.z2.m7(Unknown Source)
    at com.aspose.pdf.internal.p650.z2.m4(Unknown Source)
    at com.aspose.pdf.internal.p651.z2.m2(Unknown Source)
    at com.aspose.pdf.internal.p651.z2.<init>(Unknown Source)
    at com.aspose.pdf.internal.p652.z1.m4(Unknown Source)
    at com.aspose.pdf.internal.p652.z7.<init>(Unknown Source)
    at com.aspose.pdf.internal.p652.z1.<init>(Unknown Source)
    at com.aspose.pdf.internal.p652.z3.<init>(Unknown Source)
    at com.aspose.pdf.internal.p651.z8.m1(Unknown Source)
    at com.aspose.pdf.internal.p654.z29.m28(Unknown Source)
    at com.aspose.pdf.internal.p657.z6.m1(Unknown Source)
    at com.aspose.pdf.internal.p657.z9.m4(Unknown Source)
    at com.aspose.pdf.internal.p657.z9.<init>(Unknown Source)
    at com.aspose.pdf.internal.p657.z6.m1(Unknown Source)
    at com.aspose.pdf.internal.p657.z11.m1(Unknown Source)
    at com.aspose.pdf.internal.p657.z11.m3(Unknown Source)
    at com.aspose.pdf.internal.p657.z11.m7(Unknown Source)
    at com.aspose.pdf.internal.p657.z11.m7(Unknown Source)
    at com.aspose.pdf.internal.p657.z13.m1(Unknown Source)
    at com.aspose.pdf.internal.p657.z13.m1(Unknown Source)
    at com.aspose.pdf.internal.p657.z13.m6(Unknown Source)
    at com.aspose.pdf.internal.p657.z13.<init>(Unknown Source)
    at com.aspose.pdf.internal.p657.z13.<init>(Unknown Source)
    at com.aspose.pdf.TextFragmentAbsorber.visit(Unknown Source)
    at com.aspose.pdf.Page.accept(Unknown Source)
    at com.aspose.pdf.PageCollection.accept(Unknown Source)
    at ch.axonivy.fintech.abs.document.utils.DocumentUtil.fucking(DocumentUtil.java:214)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at ch.ivyteam.ivy.scripting.internal.types.IvyJavaMethod.invokeImpl(IvyJavaMethod.java:73)

任何人都有同样的问题吗?

0 个答案:

没有答案