Package org.jpedal.io

Examples of org.jpedal.io.DecryptionFactory


           PdfFileReader objectReader=currentPdfFile.getObjectReader();
           ObjectDecoder objectDecoder=new ObjectDecoder(currentPdfFile.getObjectReader());

           //read info object (may be defined and object set in different trailers so must be done at end)
           DecryptionFactory decryption=objectReader.getDecryptionObject();
           PdfObject infoObject=objectReader.getInfoObject();
           if(infoObject!=null &&(!(decryption!=null && (decryption.getBooleanValue(PDFflags.IS_FILE_ENCRYPTED) || decryption.getBooleanValue(PDFflags.IS_PASSWORD_SUPPLIED)))))
               readInformationObject(infoObject,objectDecoder);

           //read and set XML value
           if(metadataObj!=null){
View Full Code Here


    public boolean isFileViewable(PdfObjectReader currentPdfFile) {
        if (currentPdfFile != null){
            PdfFileReader objectReader=currentPdfFile.getObjectReader();

            DecryptionFactory decryption=objectReader.getDecryptionObject();
            return decryption==null || decryption.getBooleanValue(PDFflags.IS_FILE_VIEWABLE) || certificate!=null;
        }else
            return false;
    }
View Full Code Here

    public boolean isPasswordSupplied(PdfObjectReader currentPdfFile) {
        //allow through if user has verified password or set certificate
        if (currentPdfFile != null){
            PdfFileReader objectReader=currentPdfFile.getObjectReader();

            DecryptionFactory decryption=objectReader.getDecryptionObject();
            return decryption!=null && (decryption.getBooleanValue(PDFflags.IS_PASSWORD_SUPPLIED) || certificate!=null);
        }else
            return false;
    }
View Full Code Here

TOP

Related Classes of org.jpedal.io.DecryptionFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.