Package org.apache.fop.pdf

Examples of org.apache.fop.pdf.PDFStream


    protected void closePage() {
        if (!pdfContext.isPagePending()) {
            return; //ignore
        }
        //Finish page
        PDFStream pdfStream = this.pdfDoc.getFactory().makeStream(
                PDFFilterList.CONTENT_FILTER, false);
        pdfStream.add(getString());
        currentStream = null;
        this.pdfDoc.registerObject(pdfStream);
        pdfContext.getCurrentPage().setContents(pdfStream);
        PDFAnnotList annots = pdfContext.getCurrentPage().getAnnotations();
        if (annots != null) {
View Full Code Here


    protected void closePage() {
        if (!pdfContext.isPagePending()) {
            return; //ignore
        }
        //Finish page
        PDFStream pdfStream = this.pdfDoc.getFactory().makeStream(
                PDFFilterList.CONTENT_FILTER, false);
        pdfStream.add(getString());
        currentStream = null;
        this.pdfDoc.registerObject(pdfStream);
        pdfContext.getCurrentPage().setContents(pdfStream);
        PDFAnnotList annots = pdfContext.getCurrentPage().getAnnotations();
        if (annots != null) {
View Full Code Here

    protected void closePage() {
        if (!pdfContext.isPagePending()) {
            return; //ignore
        }
        //Finish page
        PDFStream pdfStream = this.pdfDoc.getFactory().makeStream(
                PDFFilterList.CONTENT_FILTER, false);
        pdfStream.add(getString());
        currentStream = null;
        this.pdfDoc.registerObject(pdfStream);
        pdfContext.getCurrentPage().setContents(pdfStream);
        PDFAnnotList annots = pdfContext.getCurrentPage().getAnnotations();
        if (annots != null) {
View Full Code Here

    }

    /** {@inheritDoc} */
    public void output(OutputStream stream) throws IOException {
        populateDictionary();
        PDFStream helperStream = new PDFStream(trailerDictionary.getDictionary(), false) {

            @Override
            protected void setupFilterList() {
                PDFFilterList filterList = getFilterList();
                assert !filterList.isInitialized();
                filterList.addDefaultFilters(document.getFilterMap(), getDefaultFilterName());
            }

        };
        helperStream.setObjectNumber(objectNumber);
        helperStream.setDocument(document);
        ByteArrayOutputStream byteArray = new ByteArrayOutputStream();
        DataOutputStream data = new DataOutputStream(byteArray);
        addFreeEntryForObject0(data);
        for (ObjectReference objectReference : objectReferences) {
            assert objectReference != null;
            objectReference.output(data);
        }
        new UncompressedObjectReference(startxref).output(data);
        data.close();
        helperStream.setData(byteArray.toByteArray());
        PDFDocument.outputIndirectObject(helperStream, stream);
    }
View Full Code Here

        if (!pdfContext.isPagePending()) {
            return; //ignore
        }
        currentStream.write("Q\n");
        //Finish page
        PDFStream pdfStream = this.pdfDoc.getFactory().makeStream(
                PDFFilterList.CONTENT_FILTER, false);
        pdfStream.add(getString());
        currentStream = null;
        this.pdfDoc.registerObject(pdfStream);
        pdfContext.getCurrentPage().setContents(pdfStream);
        PDFAnnotList annots = pdfContext.getCurrentPage().getAnnotations();
        if (annots != null) {
View Full Code Here

    protected void closePage() {
        if (!pdfContext.isPagePending()) {
            return; //ignore
        }
        //Finish page
        PDFStream pdfStream = this.pdfDoc.getFactory().makeStream(
                PDFFilterList.CONTENT_FILTER, false);
        pdfStream.add(getString());
        currentStream = null;
        this.pdfDoc.registerObject(pdfStream);
        pdfContext.getCurrentPage().setContents(pdfStream);
        PDFAnnotList annots = pdfContext.getCurrentPage().getAnnotations();
        if (annots != null) {
View Full Code Here

            String xFormKey = "3D_Overlay_XForm_" + uri;
            PDFFormXObject xForm = (PDFFormXObject) pdfi.pdfDoc
                .getXObject(xFormKey);
            if (xForm == null) {
                // Form XObject content stream
                PDFStream xFormStream = pdfi.factory.makeStream(
                    PDFFilterList.CONTENT_FILTER, false);

                // locate the image with the upper left corner
                Rectangle2D pos = new Rectangle2D.Double(0, 0, imgSize
                    .getWidthMpt(), imgSize.getHeightMpt());
View Full Code Here

        // Backup current renderer settings
        // -------------------------------------------------------------------
        int oldCurrentIPPosition = currentIPPosition;
        int oldCurrentBPPosition = currentBPPosition;
        boolean oldInTextMode = inTextMode;
        PDFStream oldCurrentStream = currentStream;
        // Set the Form XObject content stream settings because the image adding
        // procedure will write to the currentStream.
        currentStream = stream;
        currentIPPosition = 0;
        currentBPPosition = 0;
View Full Code Here

    protected void closePage() {
        if (!pdfContext.isPagePending()) {
            return; //ignore
        }
        //Finish page
        PDFStream pdfStream = this.pdfDoc.getFactory().makeStream(
                PDFFilterList.CONTENT_FILTER, false);
        pdfStream.add(getString());
        currentStream = null;
        this.pdfDoc.registerObject(pdfStream);
        pdfContext.getCurrentPage().setContents(pdfStream);
        PDFAnnotList annots = pdfContext.getCurrentPage().getAnnotations();
        if (annots != null) {
View Full Code Here

    protected void closePage() {
        if (!pdfContext.isPagePending()) {
            return; //ignore
        }
        //Finish page
        PDFStream pdfStream = this.pdfDoc.getFactory().makeStream(
                PDFFilterList.CONTENT_FILTER, false);
        pdfStream.add(getString());
        currentStream = null;
        this.pdfDoc.registerObject(pdfStream);
        pdfContext.getCurrentPage().setContents(pdfStream);
        PDFAnnotList annots = pdfContext.getCurrentPage().getAnnotations();
        if (annots != null) {
View Full Code Here

TOP

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

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.