Package org.pdfclown.documents

Examples of org.pdfclown.documents.Document


  public boolean run(
    )
  {
    // 1. PDF file instantiation.
    File file = new File();
    Document document = file.getDocument();

    // 2. Content creation.
    populate(document);

    // (boilerplate metadata insertion -- ignore it)
View Full Code Here


      try
      {file = new File(filePath);}
      catch(Exception e)
      {throw new RuntimeException(filePath + " file access error.",e);}
    }
    Document document = file.getDocument();

    // 2. Stamp the document!
    stamp(document);

    // (boilerplate metadata insertion -- ignore it)
View Full Code Here

  public boolean run(
    )
  {
    // 1. Instantiate a new PDF file!
    File file = new File();
    Document document = file.getDocument();

    // 2. Set the document properties and resources!
    initialize(document);

    // 3. Insert the contents into the document!
View Full Code Here

    try
    {file = new File(filePath);}
    catch(Exception e)
    {throw new RuntimeException(filePath + " file access error.",e);}

    Document document = file.getDocument();

    // 2. Get the bookmarks collection!
    Bookmarks bookmarks = document.getBookmarks();
    if(bookmarks == null)
    {System.out.println("\nNo bookmark available (Outline dictionary not found).");}
    else
    {
      System.out.println("\nIterating through the bookmarks collection (please wait)...\n");
View Full Code Here

      try
      {file = new File(filePath);}
      catch(Exception e)
      {throw new RuntimeException(filePath + " file access error.",e);}
    }
    Document document = file.getDocument();

    // 2. Replace the images!
    replaceImages(document);

    // (boilerplate metadata insertion -- ignore it)
View Full Code Here

  public boolean run(
    )
  {
    // 1. PDF file instantiation.
    File file = new File();
    Document document = file.getDocument();

    // 2. Content creation.
    populate(document);

    // (boilerplate metadata insertion -- ignore it)
View Full Code Here

    )
  {
    version = VersionEnum.PDF14.getVersion();
    trailer = new PdfDictionary();
    indirectObjects = new IndirectObjects(this, null);
    document = new Document(this);
  }
View Full Code Here

    trailer = info.getTrailer();
    if(trailer.containsKey(PdfName.Encrypt)) // Encrypted file.
      throw new NotImplementedException("Encrypted files are currently not supported.");

    indirectObjects = new IndirectObjects(this, info.getXrefEntries());
    document = new Document(trailer.get(PdfName.Root));
    document.getConfiguration().setXrefMode(PdfName.XRef.equals(trailer.get(PdfName.Type)) ? XRefModeEnum.Compressed : XRefModeEnum.Plain);
  }
View Full Code Here

      {throw new RuntimeException(filePath + " file access error.",e);}
    }

    // 2. Instantiate a new PDF file!
    File file = new File();
    Document document = file.getDocument();

    // 3. Convert the first page of the source file into a form inside the new document!
    XObject form = formFile.getDocument().getPages().get(0).toXObject(document);

    // 4. Insert the contents into the new document!
View Full Code Here

  public boolean run(
    )
  {
    // 1. PDF file instantiation.
    File file = new File();
    Document document = file.getDocument();

    // 2. Populate the document!
    populate(document);

    // (boilerplate metadata insertion -- ignore it)
View Full Code Here

TOP

Related Classes of org.pdfclown.documents.Document

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.