Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4928

Could the new rendering method of PageDrawer be optional?

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.20
    • 2.0.22, 3.0.0 PDFBox
    • Rendering
    • None

    Description

      This relates to PDFBOX-4516, PDFBOX-4527, PDFBOX-4815, PDFBOX-4886, PDFBOX-4863
      I have tested the new prescaled rendering method for the
      org.apache.pdfbox.rendering.PageDrawer with PDFBox:2.0.21-SNAPSHOT for different images, with different resolutions, target image sizes etc. and compared the results to our old expectations (pre 2.0.20). And I really like it!

      However it seems to depend on the person's subjective perception (atleast for my tested images), whether I like the old or the new results better. When asking my colleagues, I heard arguments for both sides.

      Therefore my question is: Could a RenderingHint be introduced to disable/enable this separately and more intentionally, instead of assuming, that the scaling method must always be applied for specific scaling factors?
      This would allow users to select the scaling method according to their own liking and needs.

      I can not really find a crystal clear, objective answer, whether the one or the other is "better", therefore I would prefer being able to de/activate it according to my own judgement.
      As far as I understand, the criterion (scaleX < 0.5
      || scaleY < 0.5) has been selected rather arbitrarily.( ? )
      But what if I want to apply it even to images above those scaling factors?
      What if I want to not apply it to images bellow those scaling factors?
      What if I want to apply it to Image A, but not to Image C, for some unknown reason?

      Attachments

        1. unprescaled.png
          863 kB
          Christian Appl
        2. prescaled.png
          857 kB
          Christian Appl
        3. image-2020-08-03-09-43-37-412.png
          398 kB
          Christian Appl

        Activity

          People

            tilman Tilman Hausherr
            capSVD Christian Appl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: