pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KUCHI BHARGAV <mr.adfco...@gmail.com>
Subject I Have a question on PDDocument.getCurrentAccessPermission().canPrint()
Date Mon, 24 Jun 2013 11:02:51 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message