Skip to main content
Thirusanguraja Venkatesan
Known Participant
September 2, 2013
Question

How to Add Annotations in postscript?

  • September 2, 2013
  • 1 reply
  • 3184 views

Hi,

I want to add comment like Sticky note, highlight text, insert text at cursor, replace, .. in PDF postscript coding with the help of Annotations,

So I was referred document, Adobe Portable Document Format (Version 1.4)

Under SECTION 8.4

Example 8.6

22 0 obj

<< /Type /Annot

/Subtype /Text

/Rect [266 116 430 204]

/Contents (The quick brown fox ate the lazy mouse.)

>>

endobj

I am used above postscript code to add text annotation in my PDF file, but I am get fail with following error.


%%[ Error: undefined; OffendingCommand: obj ]%%

Stack:

0

22

-dict-

%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%

%%[ Warning: PostScript error. No PDF file produced. ] %%


Note:

I am using Distiller 5 and also I was tried in Distiller 7, Distiller X.

So please give suggestion and sample code to add annotations in postscript,

And also please clearly tell me where I wan to add my annotation code if I want to add more the one annotations in one page over the 50 pages PDF file.


Thanks & Regards

Thirusanguraja Venkatesan

This topic has been closed for replies.

1 reply

Participating Frequently
September 2, 2013

Look for "pdfmark reference" in your Acrobat documentation.

The distiller application provides a special PostScript operator, pdfmark, for

things like adding annotations or whatever at the PostScript level.

As far as I know, up to Acrobat 7.x, there was a separate pdfmark reference manual,

but since Acrobat 8, the pdfmark reference is incorporated into the

Acrobat manual.

Helge

Legend
September 2, 2013

A little more info...

The code you posted looks like PostScript, a bit, but it is not. It is PDF. You cannot just put PDF stuff into PostScript, they are completely different. You have to use special instructions (pdfmark) which actually don't look like PDF, but they instruct Distiller to create particular things in PDF.

(Note: the knowledge of PDF structures may be important; you just can't use them directly).

Thirusanguraja Venkatesan
Known Participant
September 2, 2013

Ya surely you correct Mr. MVP.

Just I had doubt and confusion about code where initially I was post, so only I am asked.

Any way thanks very much for your involvement in my discussion.


Thanks & Regard

Thirusanguraja Venkatesan