Package org.pdfclown.documents

Examples of org.pdfclown.documents.Document$Configuration


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

    Document document = file.getDocument();

    // 2. Link extraction from the document pages.
    TextExtractor extractor = new TextExtractor();
    extractor.setAreaTolerance(2); // 2 pt tolerance on area boundary detection.
    boolean linkFound = false;
    for(Page page : document.getPages())
    {
      if(!promptNextPage(page, !linkFound))
        return false;

      Map<Rectangle2D,List<ITextString>> textStrings = null;
View Full Code Here


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

    Document document = file.getDocument();
    Pages pages = document.getPages();

    // 2. Page rasterization.
    int pageIndex = promptPageChoice("Select the page to render", pages.size());
    Page page = pages.get(pageIndex);
    Dimension2D imageSize = page.getSize();
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. Content removal.
    for(Page page : document.getPages())
    {
      // Get the page contents!
      Contents contents = page.getContents();
      // Remove text content from page!
      removeText(contents);
View Full Code Here

  public boolean run(
    )
  {
    // 1. PDF file instantiation.
    File file = new File();
    Document document = file.getDocument();
    // Set default page size (A4)!
    document.setPageSize(PageFormat.getSize());

    // 2. Content creation.
    Date creationDate = new Date();
    // 2.1. Template.
    FormXObject template = buildTemplate(
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

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

    Document document = file.getDocument();

    // 2. Text extraction from the document pages.
    TextExtractor extractor = new TextExtractor();
    for(Page page : document.getPages())
    {
      if(!promptNextPage(page, false))
        return false;

      List<ITextString> textStrings = extractor.extract(page).get(null);
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. Parsing the document...
    System.out.println("\nLooking for images...");
    for(Page page : document.getPages())
    {
      scan(
        new ContentScanner(page), // Wraps the page contents into the scanner.
        page
        );
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

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

    // 2. Insert the contents into the document!
    populate(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

TOP

Related Classes of org.pdfclown.documents.Document$Configuration

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.