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

Andrea Paternesi edited comment on PDFBOX-3542 at 10/26/16 7:17 AM:
--------------------------------------------------------------------

I usually use PDDocument.load() passing a File. And in certain circumstances it 
gets the out of memory error.

There are some cases in which you cannot use JVM parameters to use more memory.
In my case we use the old java AX Bridge to integrate some signing features  
with some old MS Visual Fox code. There is no way to pass arguments in java 7 
within the bridge.

If i use a FileInputStream to load the PDDocument will it handle the stream in 
a different way?

What i need to do is only read the signatures to validate them.
So i suppose i do not need to load the entire dcument in memory but extract 
only the signature dictionary which is very little in size even with many 
signatures inside.

What i noticed is that while signing even a big file this does not happen.

I will try the 2.0.4 and see the scatch file method.

Any clue?
Thanks.
Andrea.





was (Author: patton73):
I usually use PDDocument.load() passing a File. And in certain circumstances it 
gets the out of memory error.

There are some cases in which you cannot use JVM parameters to use more memory.
In my case we use the old java AX Bridge to integrate some signing features  
with some old MS Visual Fox code. There is no way to pass arguments in java 7 
within the bridge.

If i use a FileInputStream to load the PDDocument will it handle the stream in 
a different way?

What i need to do is only read the signatures to validate them.
So i suppose i do not need to load the entire dcument in memory but extract 
only the signature dictionary which is very little in size even with many 
signatures inside.

What i noticed is that while signing even a big file this does not happen.

Any clue?
Thanks.
Andrea.




> Can PDFBOX use Streams to read PDSignatures from document?
> ----------------------------------------------------------
>
>                 Key: PDFBOX-3542
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3542
>             Project: PDFBox
>          Issue Type: Wish
>          Components: PDModel
>    Affects Versions: 2.0.3
>            Reporter: Andrea Paternesi
>            Priority: Critical
>
> I did not find a way to avoid loading into memory the whole PDDocument to 
> read the signatures dictionaries.
> If you have very big PDF files (30MB or more), java gets an Out of Memory 
> error.
> Right now i did not find a correct way to load signatures usign stream.
> Can you give any hont?
> Thanks in advance.
> Andrea.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to