Re: Strategy for dealing with non-latin characters in base font

2018-03-09 Thread Tilman Hausherr
You can subset fonts by using PDType0Font.load(), this limits memory usage. You could do that for any characters that are not in the WinAnsiEncoding. To find out whether a character is in a font, you can call encode() and catch the exception. There is no way to "add a single glyph" without

Strategy for dealing with non-latin characters in base font

2018-03-09 Thread Christopher Schultz
All, Like many other folks, we often run across the "[character] is not available in this font [font]" when we try to use some character such as ≥ or ≤ or ® or whatever. (We are trying to keep the generated PDF files as small as possible, so we'd prefer to use the simplest fonts possible.) For

Re: International characters only show correctly when form field is selected

2018-03-09 Thread Tilman Hausherr
Am 09.03.2018 um 19:40 schrieb Scott Tomer: Thanks, again, I really appreciate your help. Also, just an FYI, I found where my code is giving the following exception when trying to use those characters: Exception: U+0144 ('nacute') is not available in this font Times-Roman (generic:

Re: International characters only show correctly when form field is selected

2018-03-09 Thread Tilman Hausherr
Ok, now I don't have further questions, but I am still wondering what is going on :-( What I could do is to search (with code) for a file that is similar to yours, i.e. acroform, a field with type 1 font and DictionaryEncoding. This may take some time, maybe next week. In the meantime, what

Re: International characters only show correctly when form field is selected

2018-03-09 Thread Tilman Hausherr
Hi, Could you open the /DR part completely, both the one here and in Acroform/DR ? And the "N" part too, if there are any resources with fonts. This is to see how "TiRo" is configured. Normally it should bring an exception, like this when trying to assign "Stanisław" in the CreateSimpleForm

Re: International characters only show correctly when form field is selected

2018-03-09 Thread Scott Tomer
Also, as an FYI, when I pull this up in the debugger, I get the following in my command line: Mar 09, 2018 10:40:45 AM org.apache.pdfbox.pdmodel.font.PDSimpleFont toUnicode WARNING: No Unicode mapping for .notdef (1) in font Times-Roman Mar 09, 2018 10:40:45 AM

Re: International characters only show correctly when form field is selected

2018-03-09 Thread Scott Tomer
It is generated at a customer. Here is an image from the debugger: Thanks > On Mar 8, 2018, at 8:47 PM, Tilman Hausherr wrote: > > Is the form generated in your company? If yes, can you generate an empty form > with just one field? > > If not, please open the file

Re: PKCS11 and PAdES available in PDF_BOX ?

2018-03-09 Thread Diego Azevedo
PDFBox is able to digitally sign documents using PAdES. If you wanna use PKCS#11, you will have to use a library that supports it, just as if it was PKCS#12. The crypto is not part of pdfbox itself. Take a look at CreateSignature on the examples directory on SVN:

Re: International characters only show correctly when form field is selected

2018-03-09 Thread Alessandro Bellini
Oh0u8e Il 08/Mar/2018 20:42, "Scott Tomer" ha scritto: > All, > > I’m new to the list, but tried to search pdfbox-users.markmail.org < > http://pdfbox-users.markmail.org/> before asking with no luck. > > We are using pdfbox to fill in some form fields in an Adobe generated >

PKCS11 and PAdES available in PDF_BOX ?

2018-03-09 Thread Peyroux Florentin
Hello, I'm looking for an API in order to create and fill out forms. For security, the pdf generated should be signed with PAdES and PKCS 11. Can PDF_BOX be used to sign pdf with this type of encryption? Thank you in advance, best regards, Florentin Peyroux