You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Krishnendu Datta <da...@gmail.com> on 2013/11/09 20:17:08 UTC

Pdfbox PDDocument.gwtAccessPermission().canPrint() not working as expected. Please help...

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

Re: Pdfbox PDDocument.gwtAccessPermission().canPrint() not working as expected. Please help...

Posted by Gilad Denneboom <gi...@gmail.com>.
You should report it as a bug, here:
https://issues.apache.org/jira/browse/PDFBOX


On Sat, Nov 9, 2013 at 10:22 PM, Krishnendu Datta <da...@gmail.com>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.
>
> 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
> <gi...@gmail.com>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 <datta.krish@gmail.com
> > >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
>

Re: Pdfbox PDDocument.gwtAccessPermission().canPrint() not working as expected. Please help...

Posted by Krishnendu Datta <da...@gmail.com>.
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
<gi...@gmail.com>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 <datta.krish@gmail.com
> >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

Re: Pdfbox PDDocument.gwtAccessPermission().canPrint() not working as expected. Please help...

Posted by Gilad Denneboom <gi...@gmail.com>.
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 <da...@gmail.com>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
>
>