From commits-return-15080-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Fri Jul 12 17:19:06 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2719C1802C7 for ; Fri, 12 Jul 2019 19:19:06 +0200 (CEST) Received: (qmail 66123 invoked by uid 500); 12 Jul 2019 17:19:05 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 66114 invoked by uid 99); 12 Jul 2019 17:19:05 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jul 2019 17:19:05 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 8FE153A339E for ; Fri, 12 Jul 2019 17:18:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1862991 - /pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java Date: Fri, 12 Jul 2019 17:18:59 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20190712171859.8FE153A339E@svn01-us-west.apache.org> Author: tilman Date: Fri Jul 12 17:18:58 2019 New Revision: 1862991 URL: http://svn.apache.org/viewvc?rev=1862991&view=rev Log: PDFBOX-4581, PDFBOX-4583: improve javadoc Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java?rev=1862991&r1=1862990&r2=1862991&view=diff ============================================================================== --- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java (original) +++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java Fri Jul 12 17:18:58 2019 @@ -332,7 +332,11 @@ public class PDFRenderer } /** - * Renders a given page to an AWT Graphics2D instance. + * Renders a given page to an AWT Graphics2D instance at 72 DPI. + *

+ * Read {@link #renderPageToGraphics(int, java.awt.Graphics2D, float, float, org.apache.pdfbox.rendering.RenderDestination) renderPageToGraphics(int, Graphics2D, float, float, RenderDestination)} + * before using this. + * * @param pageIndex the zero-based index of the page to be converted * @param graphics the Graphics2D on which to draw the page * @throws IOException if the PDF cannot be read @@ -344,9 +348,13 @@ public class PDFRenderer /** * Renders a given page to an AWT Graphics2D instance. + *

+ * Read {@link #renderPageToGraphics(int, java.awt.Graphics2D, float, float, org.apache.pdfbox.rendering.RenderDestination) renderPageToGraphics(int, Graphics2D, float, float, RenderDestination)} + * before using this. + * * @param pageIndex the zero-based index of the page to be converted * @param graphics the Graphics2D on which to draw the page - * @param scale the scale to draw the page at + * @param scale the scaling factor, where 1 = 72 DPI * @throws IOException if the PDF cannot be read */ public void renderPageToGraphics(int pageIndex, Graphics2D graphics, float scale) @@ -357,11 +365,14 @@ public class PDFRenderer /** * Renders a given page to an AWT Graphics2D instance. + *

+ * Read {@link #renderPageToGraphics(int, java.awt.Graphics2D, float, float, org.apache.pdfbox.rendering.RenderDestination) renderPageToGraphics(int, Graphics2D, float, float, RenderDestination)} + * before using this. * * @param pageIndex the zero-based index of the page to be converted * @param graphics the Graphics2D on which to draw the page - * @param scaleX the scale to draw the page at for the x-axis - * @param scaleY the scale to draw the page at for the y-axis + * @param scaleX the scale to draw the page at for the x-axis, where 1 = 72 DPI + * @param scaleY the scale to draw the page at for the y-axis, where 1 = 72 DPI * @throws IOException if the PDF cannot be read */ public void renderPageToGraphics(int pageIndex, Graphics2D graphics, float scaleX, float scaleY) @@ -373,11 +384,23 @@ public class PDFRenderer /** * Renders a given page to an AWT Graphics2D instance. + *

+ * Known problems: + *

    + *
  • rendering of PDF files with transparencies is not supported on Ubuntu, see + * PDFBOX-4581 and + * JDK-6689349. Rendering will + * not abort, but the pages will be rendered incorrectly.
  • + *
  • Clipping the Graphics2D will not work properly, see + * PDFBOX-4583
  • . + *
+ * If you encounter these problems, then you should render into an image by using the + * {@link #renderImage(int) renderImage} methods. * * @param pageIndex the zero-based index of the page to be converted * @param graphics the Graphics2D on which to draw the page - * @param scaleX the scale to draw the page at for the x-axis - * @param scaleY the scale to draw the page at for the y-axis + * @param scaleX the scale to draw the page at for the x-axis, where 1 = 72 DPI + * @param scaleY the scale to draw the page at for the y-axis, where 1 = 72 DPI * @param destination controlling visibility of optional content groups * @throws IOException if the PDF cannot be read */