pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: stream lengh issue?
Date Fri, 22 Sep 2017 06:38:09 GMT
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




>
> 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
View raw message