Re: Adding annotations to PDFs - "expected a name object"

2023-08-02 Thread Tilman Hausherr
A possible problem is that CP is set, but CAP doesn't exist. The specification mentions that CP is valid only if CAP is true. So I wonder what happens if you remove CP ("inline" is the default anyway). Also, IT is empty, should be a name, LineArray or LineDimension, so maybe this code isn't go

Re: Border / Box around images and form elements with backgrounds

2023-08-02 Thread Tilman Hausherr
Hi, Using losslessFactory is the only idea I had. I don't know where the line comes from. I suspect it's a "feature" in the graphics engine of some products. Tilman On 02.08.2023 22:05, JJ Blodgett wrote: This image limitation is a pain. But here is some code: var mediaBox = newPDPage.getMe

Re: Border / Box around images and form elements with backgrounds

2023-08-02 Thread JJ Blodgett
This image limitation is a pain. But here is some code: var mediaBox = newPDPage.getMediaBox(); var imgWidth = Int(mediaBox.getUpperRightX()); var imgHeight = Int(mediaBox.getUpperRightY()); var bufferedImage = objRender.renderImageWithDPI(i, dpi, objImageType[url.colorSpace]); var newPDImage =

Re: Border / Box around images and form elements with backgrounds

2023-08-02 Thread JJ Blodgett
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

Re: Supressing warnings for missing unicode mappings

2023-08-02 Thread Tilman Hausherr
Hi, Yes, reducing logging is the way. I don't know if there are more. I'd also be interested in the "unionsq" file, I wonder if this is a false positive. This happens because "uni" is a valid glyph name. There is unionsqdisplay and unionsqtext too, but not unionsq. Tilman On 02.08.2023

Re: Border / Box around images and form elements with backgrounds

2023-08-02 Thread JJ Blodgett
Not sure what you mean about ARGB being jpeg. The examples I provided should have been PNG. The use case and reason we're doing this has to do with file sizes. These are insurance documents. There could be 20-50 different individual templates at play depending on the exact makeup of each insura

Re: Adding annotations to PDFs - "expected a name object"

2023-08-02 Thread sahy...@fileaffairs.de
Hi Kai, so you have an approach you can follow. If there are further issues let us know. caption-style is likely using rich text settings which PDFBox doesn't support. Maybe you can submit a snippet of the XFDF containing that attribute so that we can take a look if time permits. BR Maruan Am

AW: Adding annotations to PDFs - "expected a name object"

2023-08-02 Thread Kai Keggenhoff
Hi Maruan, the process was mentioned in the original mail and is as follows: XFDF is parsed to DOM DOM is used to create a FDFDocument FDFAnnotation(s) are read from FDFDocument.getCatalog().getFDF().getAnnotations() For each FDFAnnotation, a PDAnnotation is created from the FDFAnnotation's.get

Re: Adding annotations to PDFs - "expected a name object"

2023-08-02 Thread sahy...@fileaffairs.de
Hello Kai, Am Mittwoch, dem 02.08.2023 um 09:24 + schrieb Kai Keggenhoff: > Hi Maruan, > > we let Adobe Reader submit a form with flags set for XFDF, include > annotations and "ExclNonUserAnnots" (table 237 in the PDF 32000- > 1:2008 spec) > The XFDF is sent to a server address specific for t

AW: Adding annotations to PDFs - "expected a name object"

2023-08-02 Thread Kai Keggenhoff
Hi Maruan, we let Adobe Reader submit a form with flags set for XFDF, include annotations and "ExclNonUserAnnots" (table 237 in the PDF 32000-1:2008 spec) The XFDF is sent to a server address specific for the document and then processed. Usually, when sent by Adobe Reader, the full XFDF contain

Supressing warnings for missing unicode mappings

2023-08-02 Thread Brangs, Erik
Hi, we're using PDFBox 3.0.0-beta1 to extract text from PDFs. This produces lots of warnings about missing unicode mappings. Is there a programmatic way to suppress those messages or would it be better to configure the logging to do that? If it's better to configure logging, I would try to con

Re: Adding annotations to PDFs - "expected a name object"

2023-08-02 Thread sahy...@fileaffairs.de
Hello Kai, Am Mittwoch, dem 02.08.2023 um 07:56 + schrieb Kai Keggenhoff: > > > > Hi Tilman, >   > thank you for the suggestion. Turns out, it's “Line” annotations. > When I import >   > > http://ns.adobe.com/xfdf/"; xml:space="preserve"> >     >   

AW: Adding annotations to PDFs - "expected a name object"

2023-08-02 Thread Kai Keggenhoff
Hi again, the attachment with the screenshot didn't make it through, let me try an inline image. [cid:image002.png@01D9C528.2A0E3C40] Von: Kai Keggenhoff Gesendet: Mittwoch, 2. August 2023 09:57 An: users@pdfbox.apache.org Betreff: AW: Adding annotations to PDFs - "expected a name object" CAU

AW: Adding annotations to PDFs - "expected a name object"

2023-08-02 Thread Kai Keggenhoff
Hi Tilman, thank you for the suggestion. Turns out, it's "Line" annotations. When I import http://ns.adobe.com/xfdf/"; xml:space="preserve">