pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Esteban R <eru...@hotmail.com>
Subject Re: stream lengh issue?
Date Mon, 25 Sep 2017 17:25:15 GMT
Thanks!. I have solved my issue (which was not related to stream length).


Esteban Ruiz


________________________________
De: Tilman Hausherr <THausherr@t-online.de>
Enviado: viernes, 22 de septiembre de 2017 06:38 a.m.
Para: users@pdfbox.apache.org
Asunto: Re: stream lengh issue?

Am 22.09.2017 um 05:38 schrieb Esteban R:

Hello. I am creating some pdf files with pdfbox 2.0.7 and I have some issues which seems to
be related to the length of the content streams: the length doesn't seem to match the real
length.


I think that this is a basic example to show the issue:


Create a .txt file containing just the letter 'a'.

java -jar pdfbox-app-2.0.7.jar TextToPDF out.pdf a.txt

java -jar pdfbox-app-2.0.7.jar PDFDebugger out.pdf  => Root/Pages/Kids/[0]/Contents/Length
is 52 but there are only 51 chars  in the hex view.

The Length is for the raw (Flate encoded) stream. Which is really 52.

Tilman

[cid:part1.639518BE.2F50FAF0@t-online.de]



java -jar pdfbox-app-2.0.7.jar TextToPDF WriteDecodedDoc out.pdf

java -jar pdfbox-app-2.0.7.jar PDFDebugger out.pdf  => Root/Pages/Kids/[0]/Contents/Length
is 51 now (which seems to be ok, hex view didn't change).


Esteban Ruiz







Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message