Hi,
Hi Gamboni,
pdfDocument.setOptimizeSize(true);
// Optimzie the file size by removing unused objects
Document.OptimizationOptions opt = new Document.OptimizationOptions();
opt.setRemoveUnusedObjects(false);
opt.setLinkDuplcateStreams(false);
opt.setRemoveUnusedStreams(false);
// Enable image compression
opt.setCompressImages(true);
// Set the quality of images in PDF file
opt.setImageQuality(10);
opt.setImageQuality(50);
opt.setMaxResoultion(75);;
pdfDocument.save(“OptimizeDocument_out11.pdf”);
Hi,
Another question: can you explain me what unit of measure are used in following functions?
Hi Gamboni,
In case you still face any issue while using our API, please share the input PDF files, so that we can test the scenario in our environment. We are sorry for this inconvenience.
Gimbo71:
Another question: can you explain me what unit of measure are used in following functions?- setMaxResoultion(number)- save(stream, dpi_x, dpi_y)Hi Gamboni,The unit for these methods is Point.Please note that the basic unit for our API to measure page height and width properties is points, where 1 inch = 72 points and 1 cm = 1/2.54 inch = 0.3937 inch = 28.3 points.Converting Points to Pixels
The conversion from point to pixel depends on an image’s DPI (dots per inch) property. For example, if an image’s DPI is 96 (96 pixels for each inch), and it is 100 points high, its height in pixels is (100 / 72) * 96 = 133.3. The general formula is: pixels = ( points / 72 ) * DPI.