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

Andreas Lehmkühler commented on PDFBOX-5086:
--------------------------------------------

{quote}How about storing the File object in the PDDocument (when opened with a 
File parameter) and compare when saving? {quote}
I've removed all the file stuff for loading a pdf and I don't want to bring it 
back, just to implement some locking

{quote}There are other areas where we allow to overwrite the source such as 
within the PDFBox app. Having parsed a PDF partially would it be possible with 
that information to do an incremental save?{quote}
This is all about saving a pdf using PDDocument#save and it doesn't make that 
much sense to overwrite the source by default

{quote}This will only work for file based input other types such as InputStream 
are also supported{quote}
Correct. We can't implement it idiot-proof. I'm going to add a comment as 
proposed by [~mkl]

I'm experimenting with a locking mechanism based on FileChannel#lock to avoid 
overwriting the source withing the same JVM.

> DataFormatException after saving
> --------------------------------
>
>                 Key: PDFBOX-5086
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5086
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Tilman Hausherr
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 3.0.0 PDFBox
>
>         Attachments: SalesUseTaxLA_R-5402_20060705.pdf, 
> SalesUseTaxLA_R-5402_20060705_BAD.pdf
>
>
> Attached file gets corrupted when saved in 3.0.0, but not in 2.0.*.



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

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

Reply via email to