Package org.pdfclown.documents.interchange.metadata

Examples of org.pdfclown.documents.interchange.metadata.Information


  private void buildPdf_metadata(
    Document document
    )
  {
    // Document metadata.
    Information info = new Information(document);
    document.setInformation(info);
    info.setAuthor("Stefano Chizzolini");
    info.setCreationDate(new Date());
    info.setCreator(HelloWorld.class.getName());
    info.setTitle("Sample document");
    info.setSubject("Online PDF creation sample through servlet.");
  }
View Full Code Here


    ViewerPreferences view = new ViewerPreferences(document); // Instantiates viewer preferences inside the document context.
    document.setViewerPreferences(view); // Assigns the viewer preferences object to the viewer preferences function.
    view.setDisplayDocTitle(true);

    // Document metadata.
    Information info = new Information(document);
    document.setInformation(info);
    info.setAuthor("Stefano Chizzolini");
    info.setCreationDate(new Date());
    info.setCreator(getClass().getName());
    info.setTitle("PDF Clown - " + title + " sample");
    info.setSubject("Sample about " + subject + " using PDF Clown");
  }
View Full Code Here

  {
    PdfDirectObject informationObject = getFile().getTrailer().get(PdfName.Info);
    if(informationObject == null)
      return null;

    return new Information(informationObject);
  }
View Full Code Here

    Document document = file.getDocument();

    // 2. Document parsing.
    // 2.1. Showing basic metadata...
    System.out.println("\nDocument information:");
    Information info = document.getInformation();
    if(info == null)
    {System.out.println("No information available (Info dictionary doesn't exist).");}
    else
    {
      System.out.println("Author: " + info.getAuthor());
      System.out.println("Title: " + info.getTitle());
      System.out.println("Subject: " + info.getSubject());
      System.out.println("CreationDate: " + info.getCreationDate());
    }

    System.out.println("\nIterating through the indirect-object collection (please wait)...");

    // 2.2. Counting the indirect objects, grouping them by type...
View Full Code Here

TOP

Related Classes of org.pdfclown.documents.interchange.metadata.Information

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.