Aspose.Pdf linearized files have bad hint tables

When Aspose.Pdf writes linearized PDFs, it doesn’t properly byte-align the shared object hint table within the hint table stream.

I’ve attached an example. Misc_questions_linearized.pdf’s hint table object is

49 0 obj <>
and the contents of the stream is
00000000  00 00 00 05 00 00 03 68  00 04 00 00 0a a9 00 10  |.......h........|
00000010 00 00 00 00 00 00 00 00 0a a9 00 10 00 04 00 05 |................|
00000020 00 00 00 04 c0 00 02 20 97 5b 01 a6 00 d4 00 9f |....... .[......|
00000030 01 cb 07 8d 07 95 00 00 0b ba bb ac 29 d0 95 2d |............)..-|
00000040 8d 73 e0 53 21 2a 5b 1a e7 c0 a8 4a 96 c6 b9 f0 |.s.S!*[....J....|
00000050 29 90 95 2d 8d 73 e0 53 21 2a 5b 1a e7 c0 a8 4a |)..-.s.S!*[....J|
00000060 96 c6 b9 f0 29 8e 84 a9 6c 6b 9f 09 75 b0 1a 60 |....)...lk..u..`|
00000070 0d 40 09 f0 1c b0 78 d0 79 50 00 00 00 00 00 00 |.@....x.yP......|
00000080 00 00 00 00 00 00 01 10 00 00 01 10 00 00 00 00 |................|
00000090 01 e0 01 00 07 10 00 b0 03 50 91 e0 0e 50 04 c0 |.........P...P..|
000000a0 05 10 05 30 06 40 00 00 21 10 33 60 02 90 09 e0 |...0.@..!.3`....|
000000b0 0d 10 02 28 cf d0 00 |...(...|
The shared object table got written starting in the middle of byte 123, but a program reading this will start reading it at the beginning of byte 123, resulting in nonsense like there being 0x10000001 shared objects. This has been wreaking havoc on some utilities we use on Linux, with multiple GB of memory allocated and several minute delays.

Hi Jeffrey,


Thanks for contacting support.

I have logged above stated scenario as an investigation ticket in our issue tracking system as PDFNEWNET-40608. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

This thread has started a while ago, but I don’t see this ticket resolution in any of the release notes I’ve been looking.

Can I have the status of the ticket please?

@samuelmartinucci

We are afraid that the ticket could not get resolved. Are you facing the similar issue? Please confirm if you are seeing it while using the latest version of the API? In case yes, we request you share a sample PDF for our reference along with some details of the issue and code snippet. We will log a dedicated ticket for your case and share the ID with you.