Examples of PdfReader


Examples of com.lowagie.text.pdf.PdfReader

      if (getValue("pdffile") == null) throw new InstantiationException("You need to choose a source PDF file");
      if (getValue("destfile") == null) throw new InstantiationException("You need to choose a destination PDF file");
            FileInputStream bmReader = new FileInputStream( (File) getValue("xmlfile") );
            List<HashMap<String, Object>> bookmarks = SimpleBookmark.importFromXML( bmReader );
            bmReader.close();
            PdfReader reader = new PdfReader(((File)getValue("pdffile")).getAbsolutePath());
            reader.consolidateNamedDestinations();
            PdfStamper stamper = new PdfStamper(reader, new FileOutputStream((File)getValue("destfile")));
            stamper.setOutlines(bookmarks);
            stamper.setViewerPreferences(reader.getSimpleViewerPreferences() | PdfWriter.PageModeUseOutlines);
            stamper.close();
    }
    catch(Exception e) {
      e.printStackTrace();
          JOptionPane.showMessageDialog(internalFrame,
View Full Code Here

Examples of org.jpedal.io.PdfReader

                is.close();

                //possible that page still being decoded on slower machine so wait
                decode_pdf.waitForDecodingToFinish();

                decode_pdf.currentPdfFile = new PdfReader();

                /** get reader object to open the file if all downloaded*/
                if(isAlive() && !isInterrupted()){
                    decode_pdf.openPdfFile(tempURLFile.getAbsolutePath());

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.