speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
292 stars 36 forks source link

size in attachments #439

Closed pr-apes closed 1 year ago

pr-apes commented 1 year ago

@pgundlach,

this line

https://github.com/speedata/publisher/blob/750feb974ddb169f469d814fdf4975a7e99b7ac4/src/lua/publisher.lua#L7172

is responsible for code such as:

<<
  /Params <<
    /ModDate (D:20220824132726+00'00')
  >>
  /Subtype /text#2Fxml
  /Type /EmbeddedFile
  /Length 5398
>>

But without /Size in /Params, Acrobat won't display file size.

nosize-fs8

So the final code should read:

<<
  /Params <<
    /ModDate (D:20220824132726+00'00')
    /Size 5398
  >>
  /Subtype /text#2Fxml
  /Type /EmbeddedFile
  /Length 5398
>>

This would make a similar image (taken from another PDF document):

size-fs8

I'm afraid I cannot provide a patch, since I don't know how /Length is included from the Lua code.

Many thanks for your help.

pgundlach commented 1 year ago

Will be in the next version

pr-apes commented 1 year ago

Many thanks for the implementation.