Hi,

I don't do anything special - the Splitter just gives me all the pages.

List<PDDocument> documents = new Splitter().split(document);
for (int ix = 0; ix < documents.size(); ix++) {
   final File onePage = File.createTempFile("page", ".pdf");
   final PDDocument doc = documents.get(ix);
   final FileOutputStream output = new FileOutputStream(onePage);
   final COSWriter writer = new COSWriter(output);
   writer.write(doc);
   output.close();
   writer.close();
   doc.close();
}

Is it better than intended?!

/jc

2013/1/21 Andreas Lehmkuehler <[email protected]>

> Hi,
>
> Am 21.01.2013 07:17, schrieb Jan Christian Herlitz:
>
>> I am using 1.7.1
>>
>> I saw an old conversation on the web:
>> https://issues.apache.org/**jira/browse/PDFBOX-28<https://issues.apache.org/jira/browse/PDFBOX-28>
>> First I thought I had an old version since it says: "Fixed in revision
>> 1038796"
>> I was using 1.6.1 before and upgraded but the problem remained.
>>
>> /jc
>>
>> 2013/1/21 Jan Christian Herlitz <[email protected]>
>>
>>  2013/1/21 Andreas Lehmkuehler <[email protected]>
>>>
>>>  Hi,
>>>>
>>>> Am 21.01.2013 04:56, schrieb Jan Christian Herlitz:
>>>>
>>>>   When splitting a PDF, having a size of 15 799 kB, some of the pages
>>>> are
>>>>
>>>>> bigger
>>>>> than 17 300 kB!
>>>>> The list below shows some of the resulting pages and the file sizes
>>>>>
>>>>> It looks like PDFBox copies unnecessary information to each page.
>>>>> If I "Save as" a big page file with Acrobat it gets small.
>>>>>
>>>>>  Which version of PDFBox are you using?
>>>>
>>>>   You can find the file here:
>>>>
>>>>> http://sprend.com/download.****htm?C=****
>>>>> 6fa55d06e4034dfcaba3b6461ba14c****21<http://sprend.com/download.**htm?C=**6fa55d06e4034dfcaba3b6461ba14c**21>
>>>>> <http://sprend.com/**download.htm?C=**6fa55d06e4034dfcaba3b6461ba14c**
>>>>> 21 <http://sprend.com/download.htm?C=6fa55d06e4034dfcaba3b6461ba14c21>
>>>>> >
>>>>>
>>>>> The PDF contains 13 sub-PDFs with a total of 582 pages.
>>>>>
>>>> Ahh, the pdf is a portfolio which isn't supported by pdfbox, but you
> obviously
> you got a result. What did you do to split the pdf?
>
>
>  Regards
>>>>> /jc.
>>>>>
>>>>> Infogad bild 1
>>>>> --
>>>>> Excosoft • Jan Christian Herlitz
>>>>> Senior Documentation Expert
>>>>> Kammakargatan 7, SE-111 40 STOCKHOLM
>>>>> Phone & Mobile +46 (0) 70 716 88 09
>>>>> Email [email protected] <mailto:[email protected]>
>>>>> www.excosoft.se <http://www.excosoft.se>
>>>>>
>>>>>
>>>> BR
>>>> Andreas Lehmkühler
>>>>
>>>> [1] 
>>>> http://pdfbox.apache.org/mail-****lists.html<http://pdfbox.apache.org/mail-**lists.html>
>>>> <http://pdfbox.**apache.org/mail-lists.html<http://pdfbox.apache.org/mail-lists.html>
>>>> >
>>>>
>>>
> BR
> Andreas Lehmkühler
>
>


-- 
Excosoft • Jan Christian Herlitz
Senior Documentation Expert
Kammakargatan 7, SE-111 40 STOCKHOLM
Phone & Mobile +46 (0) 70 716 88 09
Email [email protected]
www.excosoft.se

Reply via email to