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

          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.
          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.
          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.
          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.
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: