AndyCyberSec / pylovepdf

ilovepdf.com python API library
GNU General Public License v3.0
75 stars 24 forks source link

How to rotate -90° (or 270) a PDF File? #12

Open brivadeneira opened 3 years ago

brivadeneira commented 3 years ago

Hello!

First at all, thanks for this amazing wrapper!

Can't find the way to to rotate -90° (or 270) a PDF File, I tried with -90, 270 and 'left', any of them modifies the position.

vasugamdha commented 3 years ago

It is pretty straightforward for all tasks.

The below code works fine for me.

from pylovepdf.tools.rotate import Rotate

t = Rotate('project_public_xxxxxxx', verify_ssl=True, proxies=None)
t.add_file('/content/demo.pdf')
t.file.rotate = 270
t.debug = False
t.set_output_folder('output_directory')

t.execute()
t.download()
t.delete_current_task()

For a demo, you can try running the cells in this colab

If your issue gets solved, please close it.