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

Sam Johnson commented on PDFBOX-2690:
-------------------------------------

Definitely would like to have this enhancement. I have PDFs going from 1.5M to 
2.3M. Seems like the xref table is in clear text, among other items. Otherwise 
the pdfbox library is wonderful! Thank you for developing it.

> Implement write support for compressed object streams
> -----------------------------------------------------
>
>                 Key: PDFBOX-2690
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2690
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Writing
>    Affects Versions: 1.8.8, 1.8.9, 2.0.0
>         Environment: PDFBox 1.8.8, Java8u25, Windows 8.1
>            Reporter: Brian Liu
>         Attachments: input2-after-save.pdf, input2.pdf
>
>
> I am using PDFBox 1.8.8 to manipulate existing PDF files. After saving a 
> document, the output file becomes several times larger than the original. 
> This is undesirable.
> *How to reproduce my problem:*
> In the following code, PDFBox simply loads an existing PDF and then save it. 
> Nothing else is done. Yet the file size still becomes several times larger.
> {code}
> import java.io.*;
> import org.apache.pdfbox.pdmodel.*;
> import org.apache.pdfbox.exceptions.*;
> class Test 
> {
>     public static void main(String[] args) throws IOException, 
> COSVisitorException {
>     PDDocument document = PDDocument.load("input2.pdf");
>     document.save("input2-after-save.pdf");
>     document.close();       
>     }
> }   
> {code}
> Attached are two sample PDF files.  input2.pdf is an original, unprocessed 
> PDF.   input2-after-save.pdf is processed by the code above.  After 
> processing, file size increases from 416kB to 1.25MB.



--
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