Package org.pdfclown.documents.contents

Examples of org.pdfclown.documents.contents.ContentScanner


  public PrimitiveComposer(
    IContentContext context
    )
  {
    this(
      new ContentScanner(context.getContents())
      );
  }
View Full Code Here


  @Override
  public void scan(
    GraphicsState state
    )
  {
    ContentScanner childLevel = state.getScanner().getChildLevel();

    if(!render(state))
    {childLevel.moveEnd();} // Forces the current object to its final graphics state.

    childLevel.getState().copyTo(state); // Copies the current object's final graphics state to the current level's.
  }
View Full Code Here

   */
  protected boolean render(
    GraphicsState state
    )
  {
    ContentScanner scanner = state.getScanner();
    Graphics2D context = scanner.getRenderContext();
    if(context == null)
      return false;

    // Render the inner elements!
    scanner.getChildLevel().render(
      context,
      scanner.getCanvasSize(),
      createRenderObject()
      );
    return true;
  }
View Full Code Here

    {
      if(!promptNextPage(page, false))
        return false;

      extract(
        new ContentScanner(page) // Wraps the page contents into a scanner.
        );
    }

    return true;
  }
View Full Code Here

  @Override
  public void scan(
    GraphicsState state
    )
  {
    ContentScanner scanner = state.getScanner();
    Path2D pathObject = (Path2D)scanner.getRenderObject();
    if(pathObject != null)
    {
      Graphics2D context = scanner.getRenderContext();

      if(closed)
      {
        pathObject.closePath();
      }
View Full Code Here

  public void render(
    Graphics2D context,
    Dimension2D size
    )
  {
    ContentScanner scanner = new ContentScanner(getContents());
    scanner.render(context,size);
  }
View Full Code Here

    // 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
        );
    }
   
    return true;
View Full Code Here

  @Override
  public void scan(
    GraphicsState state
    )
  {
    ContentScanner scanner = state.getScanner();
    Path2D pathObject = (Path2D)scanner.getRenderObject();
    if(pathObject != null)
    {
      pathObject.setWindingRule(clipMode.toAwt());
      scanner.getRenderContext().clip(pathObject);
    }
  }
View Full Code Here

  public void render(
    Graphics2D context,
    Dimension2D size
    )
  {
    ContentScanner scanner = new ContentScanner(getContents());
    scanner.render(context,size);
  }
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.ContentScanner

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.