Author: tilman
Date: Wed Sep 23 04:26:07 2026
New Revision: 1938449

Log:
PDFBOX-3293: remove trailing spaces to lessen actual commit

Modified:
   
pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
   pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
   
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawerParameters.java

Modified: 
pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
==============================================================================
--- 
pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
       Wed Sep 23 04:26:02 2026        (r1938448)
+++ 
pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
       Wed Sep 23 04:26:07 2026        (r1938449)
@@ -95,7 +95,7 @@ import org.apache.pdfbox.text.PDFTextStr
 
 /**
  * Display the page number and a page rendering.
- * 
+ *
  * @author Tilman Hausherr
  * @author John Hewson
  */
@@ -298,7 +298,7 @@ public class PagePane implements ActionL
         pageLabel.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));
         pageLabel.setBorder(BorderFactory.createEmptyBorder(5, 0, 10, 0));
         panel.add(pageLabel);
-        
+
         label = new JLabel();
         label.addMouseMotionListener(this);
         label.addMouseListener(this);
@@ -395,7 +395,7 @@ public class PagePane implements ActionL
     {
         zoomMenu.addMenuListeners(this);
         zoomMenu.setEnableMenu(true);
-        
+
         rotationMenu = RotationMenu.getInstance();
         rotationMenu.addMenuListeners(this);
         rotationMenu.setEnableMenu(true);
@@ -412,7 +412,7 @@ public class PagePane implements ActionL
 
         JMenu menuInstance = viewMenu.getMenu();
         int itemCount = menuInstance.getItemCount();
-        
+
         for (int i = 0; i< itemCount; i++)
         {
             JMenuItem item = menuInstance.getItem(i);
@@ -435,7 +435,7 @@ public class PagePane implements ActionL
 
         JMenu menuInstance = viewMenu.getMenu();
         int itemCount = menuInstance.getItemCount();
-        
+
         for (int i = 0; i< itemCount; i++)
         {
             JMenuItem item = menuInstance.getItem(i);
@@ -716,13 +716,13 @@ public class PagePane implements ActionL
             statuslabel.setText(labelText);
 
             // debug overlays
-            DebugTextOverlay debugText = new DebugTextOverlay(document, 
pageIndex, scale, 
+            DebugTextOverlay debugText = new DebugTextOverlay(document, 
pageIndex, scale,
                                                               
showTextStripper, showTextStripperBeads,
                                                               showFontBBox, 
ViewMenu.isShowGlyphBounds());
             Graphics2D g = image.createGraphics();
             debugText.renderTo(g);
             g.dispose();
-            
+
             return ImageUtil.getRotatedImage(image, rotation);
         }
 
@@ -733,12 +733,12 @@ public class PagePane implements ActionL
             {
                 BufferedImage image = get();
 
-                // We cannot use "label.setIcon(new ImageIcon(get()))" here 
-                // because of blurry upscaling in JDK9. Instead, the label is 
now created with 
+                // We cannot use "label.setIcon(new ImageIcon(get()))" here
+                // because of blurry upscaling in JDK9. Instead, the label is 
now created with
                 // a smaller size than the image to compensate that the
                 // image is scaled up with some screen configurations (e.g. 
125% on windows).
                 // See PDFBOX-3665 for more sample code and discussion.
-                label.setSize((int) Math.ceil(image.getWidth() / 
defaultTransform.getScaleX()), 
+                label.setSize((int) Math.ceil(image.getWidth() / 
defaultTransform.getScaleX()),
                               (int) Math.ceil(image.getHeight() / 
defaultTransform.getScaleY()));
                 label.setIcon(new HighResolutionImageIcon(image, 
label.getWidth(), label.getHeight()));
                 label.setText(null);

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java   
    Wed Sep 23 04:26:02 2026        (r1938448)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java   
    Wed Sep 23 04:26:07 2026        (r1938449)
@@ -134,15 +134,15 @@ public class PageDrawer extends PDFGraph
 
     // parent document renderer - note: this is needed for not-yet-implemented 
resource caching
     private final PDFRenderer renderer;
-    
+
     private final boolean subsamplingAllowed;
-    
+
     // the graphics device to draw to, xform is the initial transform of the 
device (i.e. DPI)
     private Graphics2D graphics;
     private AffineTransform xform;
     private float xformScalingFactorX;
     private float xformScalingFactorY;
-    
+
     // the page box to draw (usually the crop box but may be another)
     private PDRectangle pageSize;
 
@@ -153,13 +153,13 @@ public class PageDrawer extends PDFGraph
     // clipping winding rule used for the clipping path
     private int clipWindingRule = -1;
     private GeneralPath linePath = new GeneralPath();
-    
+
     // last clipping path
     private List<Path2D> lastClips;
 
     // clip when drawPage() is called, can be null, must be intersected when 
clipping
     private Shape initialClip;
-    
+
     // shapes of glyphs being drawn to be used for clipping
     private List<Shape> textClippings;
 
@@ -167,7 +167,7 @@ public class PageDrawer extends PDFGraph
     private final Map<PDFont, GlyphCache> glyphCaches = new HashMap<>();
 
     private final TilingPaintFactory tilingPaintFactory = new 
TilingPaintFactory(this);
-    
+
     private final Deque<TransparencyGroup> transparencyGroupStack = new 
ArrayDeque<>();
 
     // if greater zero the content is hidden and will not be rendered
@@ -202,7 +202,7 @@ public class PageDrawer extends PDFGraph
 
     /**
      * Return the AnnotationFilter.
-     * 
+     *
      * @return the AnnotationFilter
      */
     public AnnotationFilter getAnnotationFilter()
@@ -212,19 +212,19 @@ public class PageDrawer extends PDFGraph
 
     /**
      * Set the AnnotationFilter.
-     * 
+     *
      * <p>Allows to only render annotation accepted by the filter.
-     * 
+     *
      * @param annotationFilter the AnnotationFilter
      */
     public void setAnnotationFilter(AnnotationFilter annotationFilter)
     {
         this.annotationFilter = annotationFilter;
     }
-    
+
     /**
      * Returns the parent renderer.
-     * 
+     *
      * @return the parent renderer
      */
     public final PDFRenderer getRenderer()
@@ -234,7 +234,7 @@ public class PageDrawer extends PDFGraph
 
     /**
      * Returns the underlying Graphics2D. May be null if drawPage has not yet 
been called.
-     * 
+     *
      * @return the underlying Graphics2D
      */
     protected final Graphics2D getGraphics()
@@ -244,7 +244,7 @@ public class PageDrawer extends PDFGraph
 
     /**
      * Returns the current line path. This is reset to empty after each 
fill/stroke.
-     * 
+     *
      * @return the current line path
      */
     protected final GeneralPath getLinePath()
@@ -262,7 +262,7 @@ public class PageDrawer extends PDFGraph
 
     /**
      * Draws the page to the requested context.
-     * 
+     *
      * @param g The graphics context to draw onto.
      * @param pageSize The size of the page to draw.
      * @throws IOException If there is an IO error while drawing the page.
@@ -320,13 +320,13 @@ public class PageDrawer extends PDFGraph
         lastClips = null;
         Shape savedInitialClip = initialClip;
         initialClip = null;
-        
+
         boolean savedFlipTG = flipTG;
         flipTG = true;
 
         setRenderingHints();
         processTilingPattern(pattern, color, colorSpace, patternMatrix);
-        
+
         flipTG = savedFlipTG;
         graphics = savedGraphics;
         linePath = savedLinePath;
@@ -337,15 +337,15 @@ public class PageDrawer extends PDFGraph
 
     private float clampColor(float color)
     {
-        return color < 0 ? 0 : (color > 1 ? 1 : color);        
+        return color < 0 ? 0 : (color > 1 ? 1 : color);
     }
 
     /**
      * Returns an AWT paint for the given PDColor.
-     * 
+     *
      * @param color The color to get a paint for. This can be an actual color 
or a pattern.
      * @return an AWT paint for the given PDColor
-     * 
+     *
      * @throws IOException if the AWT paint could not be created
      */
     protected Paint getPaint(PDColor color) throws IOException
@@ -384,7 +384,7 @@ public class PageDrawer extends PDFGraph
                 else
                 {
                     // uncolored tiling pattern
-                    return tilingPaintFactory.create(tilingPattern, 
+                    return tilingPaintFactory.create(tilingPattern,
                             patternSpace.getUnderlyingColorSpace(), color, 
xform);
                 }
             }
@@ -460,7 +460,7 @@ public class PageDrawer extends PDFGraph
     {
         endTextClip();
     }
-    
+
     /**
      * Begin buffering the text clipping path, if any.
      */
@@ -477,7 +477,7 @@ public class PageDrawer extends PDFGraph
     {
         PDGraphicsState state = getGraphicsState();
         RenderingMode renderingMode = state.getTextState().getRenderingMode();
-        
+
         // apply the buffered clip as one area
         if (renderingMode.isClip() && !textClippings.isEmpty())
         {
@@ -488,7 +488,7 @@ public class PageDrawer extends PDFGraph
             state.intersectClippingPath(path);
             textClippings = new ArrayList<>();
 
-            // PDFBOX-3681: lastClip needs to be reset, because after 
intersection it is still the same 
+            // PDFBOX-3681: lastClip needs to be reset, because after 
intersection it is still the same
             // object, thus setClip() would believe that it is cached.
             lastClips = null;
         }
@@ -516,7 +516,7 @@ public class PageDrawer extends PDFGraph
 
     /**
      * Renders a glyph.
-     * 
+     *
      * @param path the GeneralPath for the glyph
      * @param font the font
      * @param code character code
@@ -625,7 +625,7 @@ public class PageDrawer extends PDFGraph
                 }
             }
         }
-        TransparencyGroup transparencyGroup = new TransparencyGroup(form, 
true, 
+        TransparencyGroup transparencyGroup = new TransparencyGroup(form, true,
                 softMask.getInitialTransformationMatrix(), backdropColor);
         BufferedImage image = transparencyGroup.getImage();
         if (image == null)
@@ -663,7 +663,7 @@ public class PageDrawer extends PDFGraph
 
         Rectangle originalBounds = new Rectangle(gray.getWidth(), 
gray.getHeight());
         Rectangle2D transformedBounds = 
at.createTransformedShape(originalBounds).getBounds2D();
-        
at.preConcatenate(AffineTransform.getTranslateInstance(-transformedBounds.getMinX(),
 
+        
at.preConcatenate(AffineTransform.getTranslateInstance(-transformedBounds.getMinX(),
                 -transformedBounds.getMinY()));
 
         int width = (int) Math.ceil(transformedBounds.getWidth());
@@ -851,7 +851,7 @@ public class PageDrawer extends PDFGraph
             graphics.setPaint(getNonStrokingPaint());
             graphics.fill(shape);
         }
-        
+
         linePath.reset();
 
         if (noAntiAlias)
@@ -973,7 +973,7 @@ public class PageDrawer extends PDFGraph
                 getGraphicsState().intersectClippingPath(adjustClip(linePath));
             }
 
-            // PDFBOX-3836: lastClip needs to be reset, because after 
intersection it is still the same 
+            // PDFBOX-3836: lastClip needs to be reset, because after 
intersection it is still the same
             // object, thus setClip() would believe that it is cached.
             lastClips = null;
 
@@ -1016,7 +1016,7 @@ public class PageDrawer extends PDFGraph
     {
         linePath.reset();
     }
-    
+
     /**
      * PDFBOX-5715 / PR#73: This was added to fix a problem with missing fine 
lines when printing
      * on MacOS. Lines vanish because CPrinterJob sets graphics scale to 1 for 
Printable so after
@@ -1028,7 +1028,7 @@ public class PageDrawer extends PDFGraph
      * <a href="https://github.com/apache/pdfbox/pull/173";>here</a>.
      *
      * @param linePath
-     * @return 
+     * @return
      */
     private GeneralPath adjustClip(GeneralPath linePath)
     {
@@ -1125,10 +1125,10 @@ public class PageDrawer extends PDFGraph
             {
                 // The earlier code for stencils (see "else") doesn't work 
with patterns because the
                 // CTM is not taken into consideration.
-                // this code is based on the fact that it is easily possible 
to draw the mask and 
+                // this code is based on the fact that it is easily possible 
to draw the mask and
                 // the paint at the correct place with the existing code, but 
not in one step.
                 // Thus what we do is to draw both in separate images, then 
combine the two and draw
-                // the result. 
+                // the result.
                 // Note that the device scale is not used. In theory, some 
patterns can get better
                 // at higher resolutions but the stencil would become more and 
more "blocky".
                 // If anybody wants to do this, have a look at the code in 
showTransparencyGroup().
@@ -1511,7 +1511,7 @@ public class PageDrawer extends PDFGraph
             // will trigger the workaround. Because of the slowness we only do 
it if the user
             // expects quality rendering and interpolation.
             Matrix imageTransformMatrix = new Matrix(imageTransform);
-            Matrix graphicsTransformMatrix = new Matrix(originalTransform);    
+            Matrix graphicsTransformMatrix = new Matrix(originalTransform);
             float scaleX = Math.abs(imageTransformMatrix.getScalingFactorX() * 
graphicsTransformMatrix.getScalingFactorX());
             float scaleY = Math.abs(imageTransformMatrix.getScalingFactorY() * 
graphicsTransformMatrix.getScalingFactorY());
 
@@ -1580,7 +1580,7 @@ public class PageDrawer extends PDFGraph
             bim = new BufferedImage(imageWidth, imageHeight, 
BufferedImage.TYPE_INT_RGB);
         }
 
-        // prepare transfer functions (either one per color or one for all) 
+        // prepare transfer functions (either one per color or one for all)
         // and maps (actually arrays[256] to be faster) to avoid calculating 
values several times
         Integer[] rMap;
         Integer[] gMap;
@@ -1840,7 +1840,7 @@ public class PageDrawer extends PDFGraph
 
     /**
      * For advanced users, to extract the transparency group into a separate 
graphics device.
-     * 
+     *
      * @param form the transparency group to be extracted
      * @param graphics the target graphics device
      * @throws IOException if the transparency group could not be extracted
@@ -1944,7 +1944,7 @@ public class PageDrawer extends PDFGraph
          * masks.
          * @throws IOException
          */
-        private TransparencyGroup(PDTransparencyGroup form, boolean 
isSoftMask, Matrix ctm, 
+        private TransparencyGroup(PDTransparencyGroup form, boolean 
isSoftMask, Matrix ctm,
                 PDColor backdropColor) throws IOException
         {
             Graphics2D savedGraphics = graphics;
@@ -2049,8 +2049,8 @@ public class PageDrawer extends PDFGraph
             }
             if (isSoftMask && backdropColor != null)
             {
-                // "If the subtype is Luminosity, the transparency group 
XObject G shall be 
-                // composited with a fully opaque backdrop whose colour is 
everywhere defined 
+                // "If the subtype is Luminosity, the transparency group 
XObject G shall be
+                // composited with a fully opaque backdrop whose colour is 
everywhere defined
                 // by the soft-mask dictionary's BC entry."
                 g.setBackground(new Color(backdropColor.toRGB()));
                 g.clearRect(0, 0, width, height);
@@ -2103,7 +2103,7 @@ public class PageDrawer extends PDFGraph
                     ((GroupGraphics) graphics).removeBackdrop(backdropImage, 
backdropX, backdropY);
                 }
             }
-            finally 
+            finally
             {
                 flipTG = savedFlipTG;
                 lastClips = savedLastClips;
@@ -2118,7 +2118,7 @@ public class PageDrawer extends PDFGraph
         }
 
         // http://stackoverflow.com/a/21181943/535646
-        private BufferedImage create2ByteGrayAlphaImage(int width, int height) 
+        private BufferedImage create2ByteGrayAlphaImage(int width, int height)
         {
             // gray + alpha
             int[] bandOffsets = {1, 0};
@@ -2339,7 +2339,7 @@ public class PageDrawer extends PDFGraph
         List<Boolean> visibles = new ArrayList<>(oCGs.size());
         oCGs.forEach(prop -> visibles.add(!isHiddenOCG(prop)));
         COSName visibilityPolicy = ocmd.getVisibilityPolicy();
-        
+
         // visible if any of the entries in OCGs are OFF
         if (COSName.ANY_OFF.equals(visibilityPolicy))
         {

Modified: 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawerParameters.java
==============================================================================
--- 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawerParameters.java
     Wed Sep 23 04:26:02 2026        (r1938448)
+++ 
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawerParameters.java
     Wed Sep 23 04:26:07 2026        (r1938449)
@@ -25,7 +25,7 @@ import org.apache.pdfbox.pdmodel.PDPage;
  * Parameters for a PageDrawer. This class ensures allows PDFRenderer and 
PageDrawer to share
  * private implementation data in a future-proof manner, while still allowing 
end-users to create
  * their own subclasses of PageDrawer.
- * 
+ *
  * @author John Hewson
  */
 public final class PageDrawerParameters
@@ -33,7 +33,7 @@ public final class PageDrawerParameters
     private final PDFRenderer renderer;
     private final PDPage page;
     private final boolean subsamplingAllowed;
-    private final RenderDestination destination; 
+    private final RenderDestination destination;
     private final RenderingHints renderingHints;
     private final float imageDownscalingOptimizationThreshold;
 
@@ -54,17 +54,17 @@ public final class PageDrawerParameters
 
     /**
      * Returns the page.
-     * 
+     *
      * @return the page
      */
     public PDPage getPage()
     {
         return page;
     }
-    
+
     /**
      * Returns the renderer.
-     * 
+     *
      * @return the renderer
      */
     PDFRenderer getRenderer()
@@ -74,7 +74,7 @@ public final class PageDrawerParameters
 
     /**
      * Returns whether to allow subsampling of images.
-     * 
+     *
      * @return true if subsampling of images os allowed
      */
     public boolean isSubsamplingAllowed()
@@ -99,7 +99,7 @@ public final class PageDrawerParameters
     }
 
     /**
-     * 
+     *
      * @return the imageDownscalingOptimizationThreshold
      */
 

Reply via email to