an if possible include a sample PDF to test on. BR Maruan Sahyoun
Am 24.06.2013 um 14:11 schrieb Gilad Denneboom <[email protected]>: > I'm seeing the same issue... You might want to report it in the PDFBox > JIRA: https://issues.apache.org/jira/browse/PDFBOX > Also, ap.getPermissionBytes() returns -4, which is odd. > > > On Mon, Jun 24, 2013 at 1:02 PM, KUCHI BHARGAV <[email protected]>wrote: > >> Hi All, >> I am working on PDF document features extraction >> >> i want to know whether the given pdf is printable or not >> i have used the below code snippet to test this scenario. >> >> public void testDocument(String dirfile){ >> PDDocument doc=null; >> try { >> doc = PDDocument.load(dirfile); >> } catch (IOException ie) { >> System.out.println(ie); >> } >> >> AccessPermission ap = doc.getCurrentAccessPermission(); >> if (ap == null) { >> System.out.println("Cannnot read access permission"); >> } >> System.out.println(ap.canPrint()); >> } >> >> The above highlighted code is allways returning true >> >> irrespective of the document print option ? >> >> is there any alternative way to check the pdf printing feature ? >> >> >> Thanks & Regards, >> Bhargav K >>

