Hi,
I want to compress pdf file size before upload,can anyone help to acheive it.
Hi,
I want to compress pdf file size before upload,can anyone help to acheive it.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Deepak RawatPosted May 18, 2023, 4:58 AM
You can utilize third-party libraries that provide PDF compression functionality. One such library is
pdf-lib. Here's an example of how you can compress a PDF file before uploading it in React usingpdf-libLeon DPosted May 18, 2023, 1:52 AM
Spire.PDF library is capable of compressing PDF files.
Refer to the below article:
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Document-Operation/How-to-Compress-PDF-Document-in-C-VB.NET.html
Marvin ReidPosted May 16, 2023, 9:03 PM
One solution is to compress the file via use of a backend service which would allow you to levearge the PDFOptimizierOptions class. This would provide extensive control for controlling the quality and size of the file, and it would return a compressed PDF tailored to your needs. Here is some sample code that demonstrates some options:
https://www.leadtools.com/help/sdk/tutorials/dotnet-console-optimize-pdf-files-for-storage.html
https://www.leadtools.com/help/sdk/dh/pdf/pdfoptimizeroptions.html
Selvi JpPosted Sep 5, 2022, 8:01 AM
Vishal YelvePosted Sep 2, 2022, 12:29 PM
Selvi JpPosted Sep 2, 2022, 4:51 AM
Uday DodiyaPosted Sep 2, 2022, 4:42 AM