You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Michael.Arlt@universa.de" <Mi...@universa.de> on 2023/08/01 08:20:32 UTC

RE: TextToPDF function removes the first char since 2.0.28

Many thanks Andreas! Hmm this could be a problem for others, too. But ok i will use a temporary file.
Kind regards Michael 


I've ran your shell script and got the same result, the first char is missing in the pdf.

It seems to be related to the way you are calling TextToPDF. You are simply print the text to the console and redirect it to TextToPDF.

I've changed that and echoed the text to a file and used that file as input for TextToPDF. Voila, everything works fine.

PDFBOX-5554 added support for a charset parameter and a leading UTF-8 BOM is removed automatically. I assume the latter is the issue here. It reads the input twice and somehow this doesn't work with a redirected input on linux

Andreas

Am 25.07.23 um 08:10 schrieb Michael.Arlt@universa.de:
>> the question is, where does the char got lost, when creating the pdf or when extracting the text?
> 
> Sorry if i was not precise enough. The created pdf misses the first char. So the TextToPDF function has a problem.
> 
>> Did you check the created pdf? Does it contain the whole text?
> 
> I tested/viewed it. The first char is missing.
> 
> 
> Hinweise zur Datensicherheit und zur Vertraulichkeit von E-Mails finden Sie hier:
> https://go2web.universa.de/redirect/?https://www.universa.de/e-mail-ko
> mmunikation
> 
> Informationen zum Datenschutz und zu den Betroffenenrechten können Sie nachlesen unter:
> https://go2web.universa.de/redirect/?https://www.universa.de/datenschu
> tz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

+----------------------------------------------------------------------+
| uniVersa Sicherheitshinweis                                          |
+----------------------------------------------------------------------+
| - Die Nachricht war weder inhaltsverschluesselt noch digital         |
| unterschrieben                                                       |
+----------------------------------------------------------------------+

Hinweise zur Datensicherheit und zur Vertraulichkeit von E-Mails finden Sie hier: 
https://www.universa.de/e-mail-kommunikation

Informationen zum Datenschutz und zu den Betroffenenrechten können Sie nachlesen unter: 
https://www.universa.de/datenschutz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org