0

I have to add some information as text to the existing pdf, I managed to annotate with pdf-annotate library but now, I want to rotate annotation with 90 degree what do I have to do to rotate the text? I have changed x and y for my text end point and start point but it doesn't has an effect

from pdf_annotate import PdfAnnotator, Location, Appearance
import os
filepath = r'TD-02.pdf'

a = PdfAnnotator(filepath)
text = os.path.basename(filepath)

a.add_annotation(
    "text",
    Location(x1=0, y1=0, x2=0, y2=150, page=0,),
    Appearance(fill=[0, 0, 0],stroke_width=1,font_size=50,content=text),
)
a.write(r'TD-012.pdf')
  • 1
    I think a solution might be to rotate the page, annotate and rotate back. See the [readme](https://github.com/plangrid/pdf-annotate#scaling-and-rotation) – Tranbi Jan 26 '23 at 10:38

0 Answers0