Hi team,

Based on the analysis I have found one thing regarding Linearized PDF in
2.0 and above versions of PDFBox.

COSDocument cDoc = pdDoc.getDocument();
List<COSObject> lObj = cDoc.getObjects();
        for (COSObject object : lObj)
        {
            System.out.println(object.getObjectNumber());
   }

Based on the code am retrieving  cosobject numbers of PDFDocument
which prints COSObjects sequentially.......
PDF 1.8.2 and 2.0.6 works same  except the fact that COSObject pointing to
Linearized dictionary is not added.

748 0 obj <</Linearized 1/L 1829691/O 752/E 171783/N 9/T 1814683/H [ 3196
824]>> endobj

The 748, 0 which is present in 1.8.2 is not present in 2.0.6. Is the
finding is correct and can you guide me to fix it.
If it is fixed I can able to retrieve Linearized dictionary without going
for preflight jar,

PDFBox 1.8.2
===========
COSObject{1, 0}
---------------------
------------------------------
---------------------------
COSObject{747, 0}
COSObject{748, 0}
COSObject{749, 0}
---------

PDFBox 2.0.6
===========
COSObject{1, 0}
---------------------
------------------------------
---------------------------
COSObject{747, 0}
COSObject{749, 0}
---------

Regard,
Karthick G

On Thu, Jul 13, 2017 at 12:02 PM, karthick g <[email protected]>
wrote:

> Hi Team,
>
> In our project we want to take the Linearised dictionary. Before these 2.0
> versions,
> We can able to get that dictionary by normal workarounds that without
> loading preflight document. Now after 2.0 versions we have to load the
> preflight document to get the linearized property. Which resulting in
> additional work around and which cost the project performance. Will their
> be a workaround in next release, Such that linearized property can be
> retrieved without loading Preflight document.
>
> Regards,
> Karthick G
>

Reply via email to