3.27.  Text - Rotated and Overhead

Overview

Some documents have a vertical text in the margin which is needed for identification in subsequent steps of the post-processing. Also, table headers with vertical text are used occasionally.

To test text which is rotated by an arbitrary angle, you can use the same tags as for normal text.

Example

The document used by the next example contains two vertical texts:

This is the test using a clipping area:

<testcase name="hasText_RotatedText_InClippingArea">
  <assertThat testDocument="writeDirection/verticalText.pdf">
    <hasText on="FIRST_PAGE">
      <inClippingArea upperLeftX="110" upperLeftY="130" 
                      width="130"      height="300"     unit="POINTS"
      >
        <containing>Text from bottom to top.</containing>
        <containing>Text from top to bottom.</containing>
      </inClippingArea>
    </hasText>
  </assertThat>
</testcase>

Note that the vertical text is still text with the writing direction LTR (left-to-right). Text with the direction RTL (right-to-left) will be supported by PDFUnit in a future release.