Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to specify metadata using Ghostscript?

1,955 views
Skip to first unread message

licheng513

unread,
Dec 23, 2003, 10:00:05 AM12/23/03
to
Dear ALL :)

I am a PDF newbie, but satisfied with AFPL Ghostscript to produce
PDF files in Windows. The process is quick, and the quality is great.

But, if I want to specify metadata in PDF, such as Title, Subject,
Author, Keywords, is there any command line option in Ghostscript
to do it?

Thanks.

Patrick Peccatte

unread,
Dec 23, 2003, 12:16:27 PM12/23/03
to

You must use PDFMark in PostScript file distilled by GhostScript.
On PDFMarks, see:
http://www.pdflib.com/products/more/pdfmark.html

1) In GhostScript installation directory (C:\gs), create a
Prologue.ini file containing the following PDFMark:

/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
[/Title (title of the document)
/Author (author of the document)
/Subject (subject of the document)
/Keywords (pdfmark, example, test, etc.)
/Creator (handy built in Prologue.ini file)
/DOCINFO pdfmark

2) Allow to process PDFMarks by GhostScript adding the following line in
file pdfwrite.rsp:

-dDOPDFMARKS

3) Modify Redmon argument toward RPT1 as following:

@c:\gs\pdfwrite.rsp -sOutputFile="%1" c:\gs\prologue.ini -c save pop -f -

Edit Prologue.ini according to your needs.
--
Patrick Peccatte
www.softexperience.com


licheng513

unread,
Dec 23, 2003, 1:51:04 PM12/23/03
to
On Tue, 23 Dec 2003 18:16:27 +0100, "Patrick Peccatte"
<pat...@softexperience.com> wrote:

>You must use PDFMark in PostScript file distilled by GhostScript.
>On PDFMarks, see:
>http://www.pdflib.com/products/more/pdfmark.html

[snip]

WOW! Your answer is very clear!

Thank you.

And, yes, Merry Christmas! :)


0 new messages