Package org.jpedal.io

Examples of org.jpedal.io.ObjectDecoder


        * read the form data from the file
        */
       final public PdfFileInformation readPdfFileMetadata(PdfObject metadataObj,PdfObjectReader currentPdfFile) {

           PdfFileReader objectReader=currentPdfFile.getObjectReader();
           ObjectDecoder objectDecoder=new ObjectDecoder(currentPdfFile.getObjectReader());

           //read info object (may be defined and object set in different trailers so must be done at end)
           DecryptionFactory decryption=objectReader.getDecryptionObject();
           PdfObject infoObject=objectReader.getInfoObject();
           if(infoObject!=null &&(!(decryption!=null && (decryption.getBooleanValue(PDFflags.IS_FILE_ENCRYPTED) || decryption.getBooleanValue(PDFflags.IS_PASSWORD_SUPPLIED)))))
View Full Code Here


                    if(debugPairs)
                        System.out.println(id+ ' '+obj+ ' ' +value+ ' ' +Resources.isDataExternal());

                    if(Resources.isDataExternal()){ //check and flag if missing

                        @SuppressWarnings("ObjectAllocationInLoop") ObjectDecoder objectDecoder=new ObjectDecoder(currentPdfFile.getObjectReader());

                        if(obj==null && value==null){
                            Resources.setFullyResolved(false);
                            return;
                        }else if(obj==null){

                            PdfObject childObj= ObjectFactory.createObject(type, value, type, -1);

                            childObj.setStatus(PdfObject.UNDECODED_DIRECT);
                            childObj.setUnresolvedData(StringUtils.toBytes(value), type);

                            if(!objectDecoder.resolveFully(childObj)){
                                Resources.setFullyResolved(false);
                                return;
                            }

                            //cache if setup
                            if(type==PdfDictionary.Font){
                                directFonts.put(id,childObj);
                            }
                        }else if(!objectDecoder.resolveFully(obj)){
                            Resources.setFullyResolved(false);
                            return;
                        }
                    }
View Full Code Here

        /**
         * read Dictionary object
         */
        if(hasDictionary &&(markedContentExtracted || (layerDecoder.getPdfLayerList()!=null && layerDecoder.isLayerVisible()))){
            ObjectDecoder objectDecoder=new ObjectDecoder(currentPdfFile.getObjectReader());
            objectDecoder.setEndPt(dataPointer);
            objectDecoder.readDictionaryAsObject(BDCobj, startCommand + 1, raw);
        }

        layerDecoder.BDC(BDCobj, gs, current, dataPointer, raw, hasDictionary, rawStart);

        return BDCobj;
View Full Code Here

TOP

Related Classes of org.jpedal.io.ObjectDecoder

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.