Hi All,

I am using pdfbox for validating a pdf document and one of the validation
states that whether the pdf document is printable or not.

I use the following code to perform this operation:

PDDocument document = PDDocument.load("<path_to_pdf_file>");
System.out.println(document.getCurrentAccessPermission().canPrint());

but this is returning me *true *though the pdf when opened shows the print
icon disabled.

The file that is tested with can be found at :

https://drive.google.com/file/d/0B-Ouc3yLq4_mTzVraW5Nd0ZBUzg/edit?usp=sharingt?usp=sharing

Any help regarding this will be appreciated.

Thanks,
Krishnendu


On Sun, Nov 10, 2013 at 1:53 AM, Gilad Denneboom
<[email protected]>wrote:

> You can't attach files to emails to this list. Upload them to a
> file-sharing website and post the link, instead.
>
>
> On Sat, Nov 9, 2013 at 8:17 PM, Krishnendu Datta <[email protected]
> >wrote:
>
> > Hi All,
> >
> > I am using pdfbox for validating a pdf document and one of the validation
> > states that whether the pdf document is printable or not.
> >
> > I use the following code to perform this operation:
> >
> > PDDocument document = PDDocument.load("<path_to_pdf_file>");
> > System.out.println(document.getCurrentAccessPermission().canPrint());
> >
> > but this is returning me *true *though the pdf when opened shows the
> > print icon disabled.
> >
> > Attaching the sample pdf which I used for testing.
> >
> > Any help regarding this will be appreciated.
> >
> > --
> > Thanks and Regards,
> > Krishnendu
> >
> >
>



-- 
Thanks and Regards,
Krishnendu Datta
Assistant Consultant(Technical Architect)
Tata Consultancy Services(TCS)
Mobile: +91-9163117896

Reply via email to