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

PDPageContentStream should allow drawing images at current position

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1, 3.0.0 PDFBox
    • Component/s: PDModel
    • Labels:
      None
    • Flags:
      Patch

      Description

      The PDPageContentStream class has two drawImage methods (one calling the other) but both add a transformation to the graphics state. This patch adds a drawImage method with a single parameter (the image), which only adds the image without applying any transformation.

      This is needed because otherwise there is no other way of setting a transform matrix manually which might have skew/rotation in addition to scaling/translation.

      An alternative to this patch could also be a drawImage method which takes a Matrix and applies it. But still if for whatever reasons multiple images should be drawn with the same transformation matrix this would be inflexible.

        Attachments

        1. pdpagecontentstream-drawimage.diff
          1 kB
          Michele Balistreri

          Activity

            People

            • Assignee:
              jahewson John Hewson
              Reporter:
              briksoftware Michele Balistreri
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: