Examples of PdfStream


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

Examples of org.apache.fop.pdf.PDFStream

    }

    /** {@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

Examples of org.apache.fop.pdf.PDFStream

        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

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

Examples of org.apache.fop.pdf.PDFStream

            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

Examples of org.apache.fop.pdf.PDFStream

        // 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

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

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

Examples of org.pdfclown.objects.PdfStream

    {streamObjects.add(contentsDataObject);}

    int streamIndex = -1;
    for(PdfDataObject streamObject : streamObjects)
    {
      PdfStream stream = (PdfStream)File.resolve(streamObject);
      IBuffer streamBody = stream.getBody();
      model.addRow(
        new Object[]
        {
          "(stream " + (++streamIndex) + ")",
          streamBody.getString(0, (int)streamBody.getLength())
View Full Code Here

Examples of org.pdfclown.objects.PdfStream

                dictionary,
                new Buffer(data),
                file
                );
            else // Generic stream.
              return new PdfStream(
                dictionary,
                new Buffer(data)
                );
          }
          else // Stand-alone dictionary.
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.