andycybersec / pylovepdf Goto Github PK
View Code? Open in Web Editor NEWilovepdf.com python API library
License: GNU General Public License v3.0
ilovepdf.com python API library
License: GNU General Public License v3.0
Hello,
watermark tool works perfectly with a text mark,
but it doesn't with an image:
from pylovepdf.tools.watermark import Watermark
t = Watermark(public_key, verify_ssl=True, proxies='')
t.add_file('document.pdf')
t.debug = False
t.image = 'image.png'
t.set_output_folder('./')
t.execute()
t.download()
t.delete_current_task()
the result is:
Uploading file...
File uploaded! Below file stats:
Error type: ProcessingError
message: This task can't be processed. Check why in the params.
text: ['Text cannot be blank.']
status: 400
no file to be downloaded
Task delete status: 200
This error shows up
ModuleNotFoundError: No module named 'pylovepdf.tools.imagepdf'
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.
Using: ilovepdf.new_task('imagetopdf')
task = ilovepdf.new_task('pdfjpg')
File "/home/anton/PycharmProjects/AnalyseStepInUniversity/venv/lib/python3.10/site-packages/pylovepdf/ilovepdf.py", line 101, in new_task
module_name = importlib.import_module('.tools.' + tool.lower(), package='pylovepdf')
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pylovepdf.tools.pdfjpg'
Is it possible to give a specific filename for this example here. Its was not an issue until i found that the tz of the API server and mine is different so if do
tday = date.today().strftime("%d-%m-%Y")
return True, f'{location}/compress_{tday}.pdf'
the date will be different.
I'm trying to loop over several files. When I download the pdfs and store them in a folder, they all get the same name (split_date_range.pdf), overwritting the previous files.
I had to overwrite the download method in task such that filename = self.output_filename.
can pylovepdf transform pdf to word?
I'm having this issue while "Watermark" tool
Traceback (most recent call last):
File "add_watermark.py", line 16, in <module>
task = Watermark(secret_key,
File "C:\Users\Usuário\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylovepdf\tools\watermark.py", line 28, in __init__
super(Watermark, self).__init__(public_key, True, verify_ssl, proxies)
File "C:\Users\Usuário\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylovepdf\task.py", line 42, in __init__
self.auth()
File "C:\Users\Usuário\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pylovepdf\task.py", line 50, in auth
self._set_token(response.token)
AttributeError: 'Response' object has no attribute 'token'
Using new_task()
with tool names as described in https://github.com/AndyCyberSec/pylovepdf#tools gives me some errors.
Check this gist out. My output is the following:
TOOL: imagepdf
No module named 'pylovepdf.tools.imagepdf'
TOOL: officepdf
module 'pylovepdf.tools.officepdf' has no attribute 'Officepdf'
TOOL: pdfa
module 'pylovepdf.tools.pdfa' has no attribute 'Pdfa'
TOOL: pdfjpg
No module named 'pylovepdf.tools.pdfjpg'
TOOL: validatepdfa
module 'pylovepdf.tools.validatepdfa' has no attribute 'Validatepdfa'
This is a generalization of #15 and #16
⭐ BTW, thanks for your pretty work!
Using: ilovepdf.new_task('officepdf')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.