Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.RandomAccessFileOrArray


   * @throws DocumentException
   */
  public PdfFile(File file) throws IOException, DocumentException {
    if (file == null)
      throw new IOException("No file selected.");
    RandomAccessFileOrArray pdf = new RandomAccessFileOrArray(file.getAbsolutePath());
    directory = file.getParentFile();
    filename = file.getName();
    readFile(pdf);
  }
View Full Code Here


   * @param  file  the byte[] to read
   * @throws IOException
   * @throws DocumentException
   */
  public PdfFile(byte[] file) throws IOException, DocumentException {
    RandomAccessFileOrArray pdf = new RandomAccessFileOrArray(file);
    readFile(pdf);
  }
View Full Code Here

        }
    }

    public static void populateDescription(String path, BaseFont font, FontDescription descr)
            throws IOException, NoSuchFieldException, IllegalAccessException, DocumentException {
        RandomAccessFileOrArray rf = null;
        try {
            rf = new RandomAccessFileOrArray(getTTCName(path));

            rf = populateDescription0(path, font, descr, rf);
        } finally {
            if (rf != null) {
                try {
                    rf.close();
                } catch (IOException e) {
                    // ignore
                }
            }
        }
View Full Code Here

        }
    }

    public static void populateDescription(String path, byte[] contents, BaseFont font, FontDescription descr)
            throws IOException, NoSuchFieldException, IllegalAccessException, DocumentException {
        RandomAccessFileOrArray rf = null;
        try {
            rf = new RandomAccessFileOrArray(contents);

            rf = populateDescription0(path, font, descr, rf);
        } finally {
            if (rf != null) {
                try {
                    rf.close();
                } catch (IOException e) {
                    // ignore
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.lowagie.text.pdf.RandomAccessFileOrArray

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.