Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Printing to Windows XPS or fax virtual printers
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      1.) Where content types permit, set the system property -Dorg.icepdf.core.paint.disableClipping=true.

      2.) Replace line 419 in PrintHelper currenPage.paint(...) with
           Image image = viewController.getDocument().getPageImage(pageIndex,
                      GraphicsRenderingHints.PRINT,
                      Page.BOUNDARY_CROPBOX,
                      rotation, zoomFactor);
              printGraphics.drawImage(image,0,0,null);

            Lower quality print but avoids the clipping issue as well
      Show
      1.) Where content types permit, set the system property -Dorg.icepdf.core.paint.disableClipping=true. 2.) Replace line 419 in PrintHelper currenPage.paint(...) with      Image image = viewController.getDocument().getPageImage(pageIndex,                 GraphicsRenderingHints.PRINT,                 Page.BOUNDARY_CROPBOX,                 rotation, zoomFactor);         printGraphics.drawImage(image,0,0,null);       Lower quality print but avoids the clipping issue as well

      Description

      A few clients have sent us PDF samples that render correctly on screen but are subject to clipping problems when printing.

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21994 Wed Jul 21 10:53:06 MDT 2010 patrick.corless PDF-191 addition of new dynamic system proeprty that allows users as a last resort can turn off clipping during printing. org.icepdf.core.paint.disableClipping default value is false.
          Files Changed
          Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/Shapes.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #21995 Wed Jul 21 10:56:34 MDT 2010 patrick.corless PDF-191 added commented out print to image optional code and fixed an ordering issue with the paramaters being passed into currentPage.paint(), the bounding box and rendering hints where in the incorrect order.
          Files Changed
          Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/PrintHelper.java
          Patrick Corless created issue -
          Arran Mccullough made changes -
          Field Original Value New Value
          Salesforce Case [5007000000C4AdI]
          Hide
          Patrick Corless added a comment -

          After a lot of testing and looking around it appears that for some reason the windows print driver is treating the clip incorrectly. Setting a clip seems to clear all previously drawn print data. The problem is that I can't figure out the trigger, in the document in question it shows up on the 12th page, caries the same clip over to the 13th page and that start working correctly on the 14th.

          The last element to be drawn on the 12th page is a as follows:

          934 0 obj <</Type/XObject/Resources<</ProcSet[/PDF/Text]/Font<</Helv 1038 0 R>>>>/Subtype/Form/BBox[0.0 0.0 168.546 19.35]/Matrix[1.0 0.0 0.0 1.0 0.0 0.0]/FormType 1/Length 92>>stream
          /Tx BMC
          q
          1 1 166.546 17.35 re
          W
          n
          BT
          /Helv 12 Tf
          0 g
          2 5.223 Td
          (08443571622) Tj
          ET

          There is nothing special going on here but with W gets processed the rest of the page goes missing during the print. Strangely this content is more or less painted on every page but doesn't always cause the issue.

          Couldn't find any bug report out there for this rare condition. I've added a new system property org.icepdf.core.paint.disableClipping that disables clipping for client that need a quick fix. Alternatively a client can update the PrintHelper to paint to an image first then print the image, however the quality is not as good in such a case.

          Show
          Patrick Corless added a comment - After a lot of testing and looking around it appears that for some reason the windows print driver is treating the clip incorrectly. Setting a clip seems to clear all previously drawn print data. The problem is that I can't figure out the trigger, in the document in question it shows up on the 12th page, caries the same clip over to the 13th page and that start working correctly on the 14th. The last element to be drawn on the 12th page is a as follows: 934 0 obj <</Type/XObject/Resources<</ProcSet [/PDF/Text] /Font<</Helv 1038 0 R>>>>/Subtype/Form/BBox [0.0 0.0 168.546 19.35] /Matrix [1.0 0.0 0.0 1.0 0.0 0.0] /FormType 1/Length 92>>stream /Tx BMC q 1 1 166.546 17.35 re W n BT /Helv 12 Tf 0 g 2 5.223 Td (08443571622) Tj ET There is nothing special going on here but with W gets processed the rest of the page goes missing during the print. Strangely this content is more or less painted on every page but doesn't always cause the issue. Couldn't find any bug report out there for this rare condition. I've added a new system property org.icepdf.core.paint.disableClipping that disables clipping for client that need a quick fix. Alternatively a client can update the PrintHelper to paint to an image first then print the image, however the quality is not as good in such a case.
          Patrick Corless made changes -
          Workaround Description 1.) Where content types permit, set the system property -Dorg.icepdf.core.paint.disableClipping=true.

          2.) Replace line 419 in PrintHelper currenPage.paint(...) with
               Image image = viewController.getDocument().getPageImage(pageIndex,
                          GraphicsRenderingHints.PRINT,
                          Page.BOUNDARY_CROPBOX,
                          rotation, zoomFactor);
                  printGraphics.drawImage(image,0,0,null);

                Lower quality print but avoids the clipping issue as well
          Workaround Exists [Yes]
          Salesforce Case [5007000000C4AdI] []
          Hide
          Patrick Corless added a comment -

          A new example of what appears to be the same issue came in today via support. I'll have to give it another look over, my hope is that this is a JVM but that has been fixed in a later release.

          Show
          Patrick Corless added a comment - A new example of what appears to be the same issue came in today via support. I'll have to give it another look over, my hope is that this is a JVM but that has been fixed in a later release.
          Patrick Corless made changes -
          Salesforce Case []
          Fix Version/s 4.3.3 [ 10333 ]
          Patrick Corless made changes -
          Link This issue blocks PDF-437 [ PDF-437 ]
          Evgheni Sadovoi made changes -
          Salesforce Case [5007000000MGjnj]
          Hide
          Evgheni Sadovoi added a comment -

          QPViewerIcePdf.rar contain files which can be used to reproduce the issue. Use password for encryptred file provided inside of this archive.

          Show
          Evgheni Sadovoi added a comment - QPViewerIcePdf.rar contain files which can be used to reproduce the issue. Use password for encryptred file provided inside of this archive.
          Evgheni Sadovoi made changes -
          Attachment QPViewerIcePdf.rar [ 14473 ]
          Hide
          Patrick Corless added a comment -

          Haven't heard anything from the client on this one. I have a feeling this issue is related to font bounds sometimes not correctly lining up with the text which can be seen when using text selection. The bounds problem is likely compounded when print banding clips occur.

          Show
          Patrick Corless added a comment - Haven't heard anything from the client on this one. I have a feeling this issue is related to font bounds sometimes not correctly lining up with the text which can be seen when using text selection. The bounds problem is likely compounded when print banding clips occur.
          Patrick Corless made changes -
          Fix Version/s 4.3.4 [ 10341 ]
          Fix Version/s 4.3.3 [ 10333 ]
          Migration made changes -
          Fix Version/s 4.5 [ 10342 ]
          Fix Version/s 4.3.4 [ 10341 ]
          Patrick Corless made changes -
          Fix Version/s 5.0 [ 10314 ]
          Fix Version/s 4.5 [ 10342 ]
          Patrick Corless made changes -
          Fix Version/s 5.1 [ 10675 ]
          Fix Version/s 5.0 [ 10314 ]
          Hide
          Patrick Corless added a comment -

          Closing do to inactivity. Suggest client tries latest PDF release.

          Show
          Patrick Corless added a comment - Closing do to inactivity. Suggest client tries latest PDF release.
          Patrick Corless made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 5.1 [ 10675 ]
          Resolution Won't Fix [ 2 ]
          Patrick Corless made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Patrick Corless
              Reporter:
              Patrick Corless
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: