Package org.apache.fop.pdf

Examples of org.apache.fop.pdf.PDFDictionary


            //Set up PageLabels
            pageLabels = this.pdfDoc.getFactory().makePageLabels();
            this.pdfDoc.getRoot().setPageLabels(pageLabels);
        }
        PDFNumsArray nums = pageLabels.getNums();
        PDFDictionary dict = new PDFDictionary(nums);
        dict.put("P", pageNumber);
        //TODO If the sequence of generated page numbers were inspected, this could be
        //expressed in a more space-efficient way
        nums.put(pageIndex, dict);
    }
View Full Code Here


            OutputStream out = file.getBufferOutputStream();
            IOUtils.copyLarge(in, out);
        } finally {
            IOUtils.closeQuietly(in);
        }
        PDFDictionary dict = new PDFDictionary();
        dict.put("F", file);
        String filename = PDFText.toPDFString(embeddedFile.getFilename(), '_');
        PDFFileSpec fileSpec = new PDFFileSpec(filename);
        fileSpec.setEmbeddedFile(dict);
        if (embeddedFile.getDesc() != null) {
            fileSpec.setDescription(embeddedFile.getDesc());
View Full Code Here

    /** {@inheritDoc} */
    public void setup(PDFDocument doc) {
        pdfFilter = new CCFFilter();
        pdfFilter.setApplied(true);
        PDFDictionary dict = new PDFDictionary();
        dict.put("Columns", this.image.getSize().getWidthPx());
        int compression = getImage().getCompression();
        switch (compression) {
        case TIFFImage.COMP_FAX_G3_1D :
            dict.put("K", 0);
            break;
        case TIFFImage.COMP_FAX_G3_2D :
            dict.put("K", 1);
            break;
        case TIFFImage.COMP_FAX_G4_2D :
            dict.put("K", -1);
            break;
        default:
            throw new IllegalStateException("Invalid compression scheme: " + compression);
        }
        ((CCFFilter)pdfFilter).setDecodeParms(dict);
View Full Code Here

TOP

Related Classes of org.apache.fop.pdf.PDFDictionary

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.