Skip navigation
geneyop
Currently Being Moderated

Annotation is not resized

Jul 25, 2012 2:52 AM

Tags: #annotation #zoom #xobject

Hi,

 

I cannot succeed to define an annotation that is resized according to the zoom (as it should be, according to the PDF spec).

 

In the following, a square is drawn, then an annotation is defined with the same location and size as the drawn square. The square and the annotation have the same size with zoom 100%, but not with zoom 200%.

 

So how an annotation should be defined to be correctly rezised ?

 

 

%PDF-1.3

 

1 0 obj

<</Type /Pages

/Kids [3 0 R]

/Count 1

/MediaBox [0 0 300 250]

>>

endobj

 

2 0 obj

<<

/ProcSet [/PDF /Text]

>>

endobj

 

3 0 obj

<</Type /Page

/Parent 1 0 R

/Annots [5 0 R]

/Resources 2 0 R

/Contents 4 0 R>>

endobj

 

4 0 obj

<</Length 35>>

stream

0 0 1 RG

1 w

50 150 30 30 re

S

endstream

endobj

 

5 0 obj

<<

/Type /Annot

/Subtype /Text

/Contents (Foo)

/Rect [50 150 80 180]

/AP <</N 6 0 R>>

>>

endobj

 

6 0 obj

<< /Type /XObject

/Subtype /Form

/BBox [0 0 30 30]

/Resources << /ProcSet [/PDF] >>

/Length 17

>>

stream

0 0 30 30 re

f

endstream

endobj

 

7 0 obj

<<

/Type /Catalog

/Pages 1 0 R

/PageLayout /OneColumn

>>

endobj

 

xref % XREF TO BE CORRECTED

0 7

0000000000 65535 f

0000000001 00000 n

0000000001 00000 n

0000000001 00000 n

0000000001 00000 n

0000000001 00000 n

0000000001 00000 n

0000000001 00000 n

trailer

<<

/Size 7

/Root 7 0 R

>>

startxref

97882

%%EOF

 
Replies
  • Currently Being Moderated
    Jul 25, 2012 3:10 AM   in reply to geneyop

    Just a quote from the PDF specifications:

    12.5.6.4 Text Annotations

     

    [...]Text annotations shall not scale and rotate with the page; they shall behave as if the NoZoom and NoRotate annotation flags (see Table 165) were always set.[...]

     

    Cheers,

    Jan

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points