Why is my underline annotation upside-down?

32 views
Skip to first unread message

Aaron

unread,
May 29, 2014, 7:17:23 PM5/29/14
to pdfne...@googlegroups.com
Q:

I'm importing an underline annotation from an XFDF document.  The underline annotation looks like this:

<underline style="solid" width="2" color="#000000" opacity="1"
creationdate="D:20140514154040Z00'00'" flags="print" date="D:20140514154040Z00'00'"
page="0" coords="49.089200,647.037756,143.201421,647.037756,49.089200,654.279928,143.201421,654.279928"
rect="48.089200,646.037756,144.201421,654.279928">    <contents>Text</contents> 
</underline>

When I view it in Acrobat, it's an "overline" instead of an "underline".  Why?

A:

The ordering of the QuadPoints in the XFDF file is incorrect (as described in the KB article https://groups.google.com/d/msg/pdfnet-sdk/GEBpMmHlqFo/xr06-tg94pEJ). 

The quadpoints are listed as:

coords="49.089200,647.037756,143.201421,647.037756,49.089200,654.279928,143.201421,654.279928"

These are in the following order:

  3--------4
  |        |
  |        |
  1--------2

I was able to get the correct ordering by imitating the order in which Acrobat creates QuadPoints:

coords="49.089200,654.279928,143.201421,654.279928,49.089200,647.037756,143.201421,647.037756"

That changed them to the following order:

  1--------2
  |        |
  |        |
  3--------4


Unless you want to edit the XFDF yourself, you would need to customize the code that created these annotations to use the second order.

With the correct ordering, the annotation shows up as an underline.
Reply all
Reply to author
Forward
0 new messages