compress-pdf | comptess-pdf - cli util to compress a pdf | Document Editor library
kandi X-RAY | compress-pdf Summary
kandi X-RAY | compress-pdf Summary
comptess-pdf - cli util to compress a pdf
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of compress-pdf
compress-pdf Key Features
compress-pdf Examples and Code Snippets
def compress_file(input_file: str, output_file: str):
"""Compress PDF file"""
if not output_file:
output_file = input_file
initial_size = os.path.getsize(input_file)
try:
# Initialize the library
PDFNet.Initial
Community Discussions
Trending Discussions on compress-pdf
QUESTION
I'm learning how to spoof PDFs and the next step is being able to decompress a signed PDF in order to edit its raw/source material. The problem I run into is after a signing a PDF the signature is valid, but the process of decompressing the file ends up invalidating the signature followed by the error
...ANSWER
Answered 2020-Jul-19 at 01:22I'm sure sure if there are different options/flags that I could use to achieve decompression of the file without invalidating the signature.
If anybody knows a way to decompress without invalidating signatures please let me know!
That is impossible.
A digital signature integrated in a PDF (at least an interoperable one) signs all the bytes of that file (except the placeholder containing the signature itself). Decompressing obviously changes those bytes, so the signature is invalidated.
Consequentially, you can also not spoof those bytes without invalidating the signature.
What you can try, though, is
- change content in the placeholder (which can be larger than the signature and be filled with zeros) or
- add content at the end as an incremental update.
Also you can try techniques as presented on the PDF Insecurity site. Current viewer versions should notice these techniques but probably they don't....
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install compress-pdf
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page