You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Jira)" <ji...@apache.org> on 2020/10/06 15:32:00 UTC

[jira] [Comment Edited] (PDFBOX-4979) Using Mirth with PDFBox 2.0.21 and unable to call method getPages()

    [ https://issues.apache.org/jira/browse/PDFBOX-4979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17208843#comment-17208843 ] 

Andreas Lehmkühler edited comment on PDFBOX-4979 at 10/6/20, 3:31 PM:
----------------------------------------------------------------------

It looks like some static access to getPages using some reflection magic. You have to load the pdf first to initialize the PDDocument instance. However, this is not a PDFBox issue, please ask the maintainer of Mirth.


was (Author: lehmi):
It looks like some static access to getPages using some reflection magic. You habe to load the pdf first to initialize the PDDocument instance. However, this is not a PDFBox issue, please ask the maintainer of Mirth.

> Using Mirth with PDFBox 2.0.21 and unable to call method getPages()
> -------------------------------------------------------------------
>
>                 Key: PDFBOX-4979
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4979
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.0.21
>            Reporter: Dayne Foresman
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>
> I am using javascript within Mirth and have imported the needed libraries.
> Tried calling from PDDocument and from PDPageTree; both return errors when trying to call getPages().
> 141: var pages = new Packages.org.apache.pdfbox.pdmodel.PDDocument.getPages();
> 142: /*
> 143: //Creating an iterator
> 144: //var iterator = Pages.listIterator();
> 145: var iterator = new org.apache.pdfbox.pdmodel.PDPageTree.iterator();
> LINE NUMBER: 141
> DETAILS: Java class "org.apache.pdfbox.pdmodel.PDDocument" has no public instance field or method named "getPages".
> at 0d3bfc86-b3d5-4c6b-97f2-384354459b54:141 (doTransform)
> at 0d3bfc86-b3d5-4c6b-97f2-384354459b54:177 (doScript)
> at 0d3bfc86-b3d5-4c6b-97f2-384354459b54:179
> at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.doCall(JavaS criptFilterTransformer.java:154)
> at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.doCall(JavaS criptFilterTransformer.java:119)
> at com.mirth.connect.server.util.javascript.JavaScrip tTask.call(JavaScriptTask.java:113)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
> at java.lang.Thread.run(Unknown Source)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org