Package org.pdfclown.tools

Examples of org.pdfclown.tools.Renderer


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

    // 2. Print the document!
    Renderer renderer = new Renderer();
    boolean silent = false;
    try
    {
      if(renderer.print(file.getDocument(), silent))
      {System.out.println("Print fulfilled.");}
      else
      {System.out.println("Print discarded.");}
    }
    catch(PrinterException e)
View Full Code Here


    // 2. Page rasterization.
    int pageIndex = promptPageChoice("Select the page to render", pages.size());
    Page page = pages.get(pageIndex);
    Dimension2D imageSize = page.getSize();
    Renderer renderer = new Renderer();
    BufferedImage image = renderer.render(page, imageSize);

    // 3. Save the page image!
    try
    {ImageIO.write(image,"jpg",new java.io.File(getOutputPath() + java.io.File.separator + "ContentRenderingSample.jpg"));}
    catch(IOException e)
View Full Code Here

TOP

Related Classes of org.pdfclown.tools.Renderer

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.