Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSDictionary.removeItem()


        COSWriterXRefEntry lastEntry = getXRefEntries().get( getXRefEntries().size()-1);
        trailer.setInt(COSName.SIZE, (int)lastEntry.getKey().getNumber()+1);
        // Only need to stay, if an incremental update will be performed
        if (!incrementalUpdate)
        {
          trailer.removeItem( COSName.PREV );
        }
        // Remove a checksum if present
        trailer.removeItem( COSName.DOC_CHECKSUM );
       
        trailer.accept(this);
View Full Code Here


        if (!incrementalUpdate)
        {
          trailer.removeItem( COSName.PREV );
        }
        // Remove a checksum if present
        trailer.removeItem( COSName.DOC_CHECKSUM );
       
        trailer.accept(this);
    }

    /**
 
View Full Code Here

            COSDictionary trailer = doc.getTrailer();
            trailer.setLong(COSName.PREV, doc.getStartXref());
            if (hybridPrev != -1)
            {
                COSName xrefStm = COSName.XREF_STM;
                trailer.removeItem(xrefStm);
                trailer.setLong(xrefStm, getStartxref());
            }
            addXRefEntry(COSWriterXRefEntry.getNullEntry());
   
            // sort xref, needed only if object keys not regenerated
View Full Code Here

            this.willEncrypt = false;
            // also need to get rid of the "Encrypt" in the trailer so readers
            // don't try to decrypt a document which is not encrypted
            COSDocument cosDoc = doc.getDocument();
            COSDictionary trailer = cosDoc.getTrailer();
            trailer.removeItem(COSName.ENCRYPT);
        }
        else
        {
            SecurityHandler securityHandler = document.getSecurityHandler();
            if(securityHandler != null)
View Full Code Here

        COSWriterXRefEntry lastEntry = getXRefEntries().get( getXRefEntries().size()-1);
        trailer.setInt(COSName.SIZE, (int)lastEntry.getKey().getNumber()+1);
        // Only need to stay, if an incremental update will be performed
        if (!incrementalUpdate)
        {
          trailer.removeItem( COSName.PREV );
        }
        // Remove a checksum if present
        trailer.removeItem( COSName.DOC_CHECKSUM );
       
        trailer.accept(this);
View Full Code Here

        if (!incrementalUpdate)
        {
          trailer.removeItem( COSName.PREV );
        }
        // Remove a checksum if present
        trailer.removeItem( COSName.DOC_CHECKSUM );
       
        trailer.accept(this);
    }

    /**
 
View Full Code Here

            COSDictionary trailer = doc.getTrailer();
            trailer.setLong(COSName.PREV, doc.getStartXref());
            if (hybridPrev != -1)
            {
                COSName xrefStm = COSName.XREF_STM;
                trailer.removeItem(xrefStm);
                trailer.setLong(xrefStm, getStartxref());
            }
            addXRefEntry(COSWriterXRefEntry.getNullEntry());
   
            // sort xref, needed only if object keys not regenerated
View Full Code Here

            this.willEncrypt = false;
            // also need to get rid of the "Encrypt" in the trailer so readers
            // don't try to decrypt a document which is not encrypted
            COSDocument cosDoc = doc.getDocument();
            COSDictionary trailer = cosDoc.getTrailer();
            trailer.removeItem(COSName.ENCRYPT);
        }
        else
        {
            SecurityHandler securityHandler = document.getSecurityHandler();
            if(securityHandler != null)
View Full Code Here

        COSWriterXRefEntry lastEntry = getXRefEntries().get( getXRefEntries().size()-1);
        trailer.setInt(COSName.SIZE, (int)lastEntry.getKey().getNumber()+1);
        // Only need to stay, if an incremental update will be performed
        if (!incrementalUpdate)
        {
          trailer.removeItem( COSName.PREV );
        }
        // Remove a checksum if present
        trailer.removeItem( COSName.DOC_CHECKSUM );
       
        trailer.accept(this);
View Full Code Here

        if (!incrementalUpdate)
        {
          trailer.removeItem( COSName.PREV );
        }
        // Remove a checksum if present
        trailer.removeItem( COSName.DOC_CHECKSUM );
       
        trailer.accept(this);
    }

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