Reputation: 53
i am using PdfLib in PHP. I need to get text orientation in pdf-document? How do i can do this? Maybe i can get text position and find out angle rotation.
Upvotes: 1
Views: 429
Reputation: 348
You can use these function for single line of text:
$p->fit_textline("The famous rocket looper", 300, 500, "orientate=south");
$p->fit_textline("The famous rocket looper", 50, 350, "rotate=30");
possible orientations: north, south, east, west
If you use TextFlows you can use this function:
$p->fit_textflow($tf, 250, 50, 400, 400, "rotate=30"); // and 'orientate' should work as well
Upvotes: 1