Mike
Mike

Reputation: 115

ghostscript ignores part of pdfmarks

I have a problem with pdfmarks when "merging" PDF's with ghostscript 9.22. I have following situation:

cover.pdf

In the properties of the document is mentioned

Title : cover.docx

Author: Edmond Egg

input1.pdf

In the properties of the document is mentioned

Title : input1.docx

Author: Charly Cheese

input2.pdf

In the properties of the document is mentioned

Title : input2.docx

Author: Susanna Sausage

input3.pdf

In the properties of the document is mentioned

Title : input3.docx

Author: Martha Meet

pdfmarks

[ /Title (Documents) 
[ /Author (Peters Workshop) 
[ /Subject (Repair Docs) 
[ /Creator (PPP PETERS PDF Producer) 
[ /DOCINFO pdfmark 
[ /FIT 
[ /CreationDate (D:20180927084000-01) 

[/Count 3 /Page 1  /Title (Repair Jobs ) /OUT pdfmark 
[/Page 1  /Title (cover page ) /OUT pdfmark 
[/Page 2  /Title (general overview ) /OUT pdfmark 
[/Page 69  /Title (cleaning and maintenance ) /OUT pdfmark 
[/Page 81  /Title ( visual inspection ) /OUT pdfmark 

My commandline:

gs -dBATCH -sDEVICE=pdfwrite -dNO_PDFMARK_OUTLINES -dPDFFitPage -o output.pdf cover.pdf input1.pdf input2.pdf input3.pdf pdfmarks

My output.pdf file is as follows:

Title: input3.docx

Author: Martha Meet

Subject: [empty]

Creator [empty]

CreationDate actual date/time

What do I make wrong that gs is ignoring part of my pdfmarks. As said before, bookmarks are set correctly.

Looking forward to your kind replies! Thanks to all in advance who try to help me. It is really appreciated!

Best regards

Michael

By the way: As I am new, I am not (yet) allowed to create TAGS. But I feel it could be helpful to add the tag "PDFMARKS". If somebody being allowed to create tags thinks the same, I would appreciate if you will do it for me. Thanks.

Upvotes: 3

Views: 885

Answers (1)

KenS
KenS

Reputation: 31141

Your DocInfo pdfmarks are incorrect.

You've put :

[ /Title (Documents) 
[ /Author (Peters Workshop) 
[ /Subject (Repair Docs) 
[ /Creator (PPP PETERS PDF Producer) 
[ /DOCINFO pdfmark 
[ /FIT 
[ /CreationDate (D:20180927084000-01) 

There is no pdfmark operator for any of those values. the one pdfmark in there has no values associated with it. I'm not at all sure what you think /FIT is going to do....

Something like this:

[ /Title (Documents) 
 /Author (Peters Workshop) 
 /Subject (Repair Docs) 
 /Creator (PPP PETERS PDF Producer) 
 /DOCINFO pdfmark 

will probably work.

Upvotes: 3

Related Questions