You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by karthick g <ik...@gmail.com> on 2010/09/03 06:00:54 UTC
Linearized , FidWidth and Thumbnail
Hi All,
* We are using PDFBOX 1.2.1 .
* We want to find whether the PDF is Linearized , FidWidth and Thumbnail .
Is their any solution for this in PDFBox.
* Currently we Incorporate Some code to get it. Kindly advice whether the
method we done is right . Here is the list of changes we done
Additional codes added at COSDocument.java in package org.apache.pdfbox.cos
--------------------------------------------------------------------------
1.The code added after the declaration of version
//Start of additional code
private boolean linearized;
private boolean thumbnail;
private boolean fitwidth;
//End of additional code
2.The following methods were added after the method getMethod and before the
comment for getEncryptionDictionary()
//Start of additional code
public void setLinearized()
{
linearized = true;
}
public boolean getLinearized()
{
return linearized;
}
public void setThumbnail()
{
thumbnail = true;
}
public boolean getThumbnail()
{
return thumbnail;
}
public void setFitwidth()
{
fitwidth = true;
}
public boolean getFitwidth()
{
return fitwidth;
}
//End of additional code
Additional codes added at BaseParser.java in package
org.apache.pdfbox.pdfparser
---------------------------------------------------------------------------------
1. Additional code added at parseCOSName before the calculation of retval
//Start of additional code
if (buffer.toString().equals("Linearized"))
{
document.setLinearized();
}
if (buffer.toString().equals("Thumb"))
{
document.setThumbnail();
}
if (buffer.toString().equals("FitH"))
{
document.setFitwidth();
}
//End of additional code