Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: Re: Annaotation AP dictionary
Conf: (P-PDF) Developers, Msg: 56404
From: picax
Date: 5/29/2002 05:19 PM

En/Na p-pdf-developer Listmanager ha escrit:
> From: "Steven"
> ------ AcroBuddies Forum | ------
> I am trying to programmatically add a rectangle annotation to a PDF document. I am successfully able to create the annotation, its associated popup, etc. I am, however, having trouble creating its AP object. I need to know how to create the BBox attribute's
> coordinates (/BBox [ 0 0 135 59 ]) based on the user space coordinates of the rectangle. I also need to know how to create the AP stream itself. A rectangle's AP stream is usually in the format:
> q 0 0 1 RG []0 d 2 w 1 1 83.351 40.0385 re S Q
> What I need to know is how to come up with the 83.351 and 40.0385, which obviously are related to the rectangle s size. These appear to also be related to
> the BBox coordinates which I enquired about above.
> Any help would be very much appreciated

Hi Steven,

If you would create 'on line' the Bbox attribute for 'Annotation' (it's
a 'Link' or a 'Note'?) you need to ask to your application that it
capture the actual 'Annotation Object' position in user space (always in
For example, if your workflow is in PostScript, you can know the
Bounding Box (the bounding box is the smallest rectangle that will just
enclose the entire graphic object shape) of for example the text 'Link
Me' (if you wont to create an Annotation Link) asking the interpreter
just in the last 'moveto' operator with the 'pathbbox' operator: it
returns the x1 y1 x2 y2 Bounding Box coordinates. For the 'AP stream'
you need the same information.

If you need a PostScript code support for this, e-mail me.

Marc Antoni Malagarriga

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.