Package org.pdfclown.documents.contents

Examples of org.pdfclown.documents.contents.Contents


    // 2. Content removal.
    for(Page page : document.getPages())
    {
      // Get the page contents!
      Contents contents = page.getContents();
      // Remove text content from page!
      removeText(contents);
      // Update the page contents!
      contents.flush();
    }

    // (boilerplate metadata insertion -- ignore it)
    buildAccessories(document,"Content removal","content removal from existing pages");
View Full Code Here


  }

  @Override
  public Contents getContents(
    )
  {return new Contents(getBaseObject(), getContainer(), this);}
View Full Code Here

    // 2. Content tweaking.
    for(Page page : document.getPages())
    {
      // Get the page contents!
      Contents contents = page.getContents();
      contents.add(0,new SetLineWidth(10)); // Forces the override of line width's initial value (1.0) [PDF:1.6:4.3] setting it at 10 user-space units.
      for(ContentObject obj : contents)
      {normalizeLineWidth(obj);}
      // Update the page contents!
      contents.flush();
    }

    // (boilerplate metadata insertion -- ignore it)
    buildAccessories(document,"Content tweaking","content tweaking inside existing pages");
View Full Code Here

    System.out.println(" Dictionary entries:");
    for(PdfName key : pageDictionary.keySet())
    {System.out.println("  " + key.getValue());}

    // 2. Showing page contents information...
    Contents contents = page.getContents();
    System.out.println(" Content objects count: " + contents.size());
    System.out.println(" Content head:");
    printContentObjects(contents,0,0);

    // 3. Showing page resources information...
    {
View Full Code Here

  {return new Rectangle(getInheritableAttribute(PdfName.MediaBox)).toRectangle2D();}

  @Override
  public Contents getContents(
    )
  {return new Contents(getBaseDataObject().get(PdfName.Contents), getContainer(), this);}
View Full Code Here

  {
    PdfReference reference = page.getFile().register(new PdfStream());

    return new PrimitiveComposer(
      new ContentScanner(
        new Contents(
          reference,
          reference.getIndirectObject(),
          page
          )
        )
View Full Code Here

TOP

Related Classes of org.pdfclown.documents.contents.Contents

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.