Hello guys i need a help, I have the next problem I need to upload pdf files but they must have a maximum 150kb by customs disposal some experience or command to be able to reduce the PDF size that are uploaded
I think Monkey Bread’s PDF tools might offer a feature to compress the PDF post-upload. However, I’m uncertain if the compression size is adjustable. A potential workflow could be:
- Upload the PDF.
- Apply compression.
- Review the compressed size and decide whether to accept or reject it
Tks Jay i never try monkey pdf i wil search documentation about
There are several apps that can do that from a command line.
For example Ghostscript : https://opensource.com/article/20/8/reduce-pdf
Tks Ivan y read the link but how you implement that with api ?
No api, you use the Shell class to execute the Shell commands
I have used this site for manually reduce PDF file size (web interface):
I haven’t used their API: https://developer.ilovepdf.com/
What the OP meant was reducing a PDF before uploading, I think
I see some suggestions where an online tool was needed.
If the concern is the network load, than compressing it with an online tool defeats that purpose.
I would read into the MBS plugins. But that would still upload a large file, to be compressed server-side.
A solution is to embed some Javascript code in your Xojo Web project, that would run in the browser.
I found an article on StackOverflow. I haven’t checked it yet. But that seems to be one way to go, I think.
tks for reply the user upload the file supose 2mb before save the file in the server, i need save with 150kb max that is the limit permitted
tks alberto i see the page and the api is 39 usd for 1000 converted files for month
I have seen some document PDFs that instead of having text fonts they are all images/pictures (think like a scanned page). It will be very hard to reduce some of those 2MB PDF to reduce to 150kb. The 150kb limit will be hard to meet depending on the files that can be uploaded and their source.
Is that ok or too much? We don’t know how many files you need to reduce the size per month.
Why not just upload a jpeg?
If necessary, you could just use Xojo to create your own iOS app, that scans an image, crop it, save it with the right compression settings… and finally upload it.
The MBS plugins helped me out with just these kind of things.
hi Alberto arround 7000 for month
i will tray that