Ok. Gotcha. What I'm doing is to create the image on the fly (as buffered image), then directly drawing the image using a JPEGFactory response. So maybe that's where it's getting hosed up. There are options to drawImage from content read from a file but we're trying to avoid that if possible to eliminate disk I/O as a bottleneck when dealing with multiple thousands of images.
[cid:ba407754-72d1-481d-8d9c-a271163b0497] Maybe one of these 2 steps (likely the first one) is where this is getting introduced. I haven't found a way to directly draw a bufferedImage of a PNG into a PDF without writing to file first. I'm new to the PDFBox side of things so don't have a firm grasp on all of the possibilities yet. ________________________________ From: Tilman Hausherr <[email protected]> Sent: Wednesday, August 2, 2023 11:27 AM To: [email protected] <[email protected]> Subject: Re: Border / Box around images and form elements with backgrounds EXTERNAL: Do not click links or open attachments if you do not recognize the sender. On 02.08.2023 18:11, JJ Blodgett wrote: Not sure what you mean about ARGB being jpeg. The examples I provided should have been PNG. Here's what I mean - the image in the PDF is a JPEG encoded image with a b/w JPEG ("DCTDecode" is JPEG) encoded mask. Using JPEG is a weird idea for b/w images, CCITT 4 is best. I'm wondering if the non-matching is because of the weird compression. [cid:[email protected]] Tilman

