You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/03/23 19:50:42 UTC

[jira] [Resolved] (PDFBOX-3730) Encapsulate outputStream into BufferedOutputStream in PDDocument.save()

     [ https://issues.apache.org/jira/browse/PDFBOX-3730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-3730.
-------------------------------------
    Resolution: Fixed
      Assignee: Tilman Hausherr

> Encapsulate outputStream into BufferedOutputStream in PDDocument.save()
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-3730
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3730
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Documentation, Writing
>    Affects Versions: 2.0.5
>            Reporter: Peter Pinnau
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 2.0.6, 2.1.0
>
>
> I recognized very slow performance of PDDocument.save() with a FileOutputStream over a VPN connection.
> I did some testing and found out that using PDDocument.save(File file) solved the issue. So the BufferedInputStream makes the difference.
> Since my document API uses streams I encapsulate the OutputStream in a BufferedOutputStream if neccessary:
> if (!(outputStream instanceof BufferedOutputStream)) {
>    outputStream = new BufferedOutputStream(outputStream);
> }
> pdDocument.save(outputStream);
> PDDocument.load() already does that with the InputStream. So I wonder if that would be an improvement for save(), too?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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