Examples of AccessPermission


Examples of org.pdfbox.pdmodel.encryption.AccessPermission

     * the printer, or you do not have permissions to print this document.
     */
    public void print() throws PrinterException
    {
       
        AccessPermission currentPermissions = this.getCurrentAccessPermission();
       
        if(!currentPermissions.canPrint())
        {
            throw new PrinterException( "You do not have permission to print this document." );   
        }
        PrinterJob printJob = PrinterJob.getPrinterJob();
        printJob.setPageable(this);
View Full Code Here

Examples of org.pdfbox.pdmodel.encryption.AccessPermission

     * @throws PrinterException If there is an error while printing.
     */
    public void silentPrint() throws PrinterException
    {
       
        AccessPermission currentPermissions = this.getCurrentAccessPermission();
       
        if(!currentPermissions.canPrint())
        {
            throw new PrinterException( "You do not have permission to print this document." );
        }
        PrinterJob printJob = PrinterJob.getPrinterJob();
        printJob.setPageable(this);
View Full Code Here

Examples of org.pdfbox.pdmodel.encryption.AccessPermission

        Writer output = null;
        try {
            document = getPDDocument();

            // check document is readable
            AccessPermission ap = document.getCurrentAccessPermission();
            if (! ap.canExtractContent()) {
                log.info("parse() Document (" + filename + ") isn't readable for DocSearcher.");
                throw new ConverterException("parse() can't read PDF file");
            }

            // write the text to temp file
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.