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

Request: offer Android to also use this library, by removing all usages of AWT

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0 PDFBox
    • None
    • FontBox
    • None

    Description

      I'm a newb to PDFBox, so I just wanted to try it out, to see how to create texts, hyperlinks, and images.

      Sadly, even with the most basic thing, of creating a new instance of PDDocument, this library fails to be used on Android, as it requires AWT for many things, including this simple creation.
      Android barely has anything related to AWT, as it has its own implementations of color, bitmaps, etc...

      I've also noticed that it's used for images (and probably colors and fonts as well), which makes it hard to overcome on Android.

      I think there is only one library out there that is "forked" out of PDFBox and works for Android, but it's barely maintained and is stuck in the past:
      https://github.com/TomRoush/PdfBox-Android

      Please offer some way to still use this library even on Android, without weird workarounds.
      Maybe offer some common things that are shared between the platforms.
      For color/pixel, for example, it can be one that has ARGB values, and for bitmap, it can be an array of such pixels, with definition to get width&height of the bitmap.

      Perhaps look at the library's implementation and see what can be common and what can be an additional dependency.

      Attachments

        1. pdfTest.zip
          106 kB
          AD_LB
        2. 2023-11-12_02-31-29.png
          538 kB
          AD_LB

        Activity

          People

            Unassigned Unassigned
            AndroidDeveloperLB AD_LB
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: