andob / android-awt

Combination of code from Apache Harmony and Apache Commons Imaging to replace classes in java.awt for Android.
Apache License 2.0
28 stars 15 forks source link

PrinterGraphics missing on Android #4

Closed andreasrosdal closed 1 year ago

andreasrosdal commented 4 years ago

PrinterGraphics is also missing on Android

https://github.com/LibrePDF/OpenPDF/issues/371

Drakot commented 3 years ago

Hi, is there any news about this?

andreasrosdal commented 3 years ago

Pull requests welcome.

andob commented 3 years ago

I don't know why PrinterGraphics and PrintJob would be needed, since Android has other mechanisms for printing.

@Drakot can you give me a code snippet / sample illustrating the issue? I need to replicate it.

Drakot commented 3 years ago

It only happen to me on a device that uses API 28, but i realized the library works the same.

andob commented 3 years ago

in OpenPDF, there's this class PdfPrinterGraphics2D that uses PrinterGraphics and PrinterJob. It is only instantiated in these methods from PdfContentByte class:

image

Yet none of these methods are used inside the OpenPDF project.

Make sure you're using the latest OpenPDF version,

implementation 'com.github.librepdf:openpdf:1.3.24'