Optimize PDF Document for the Web in Python

Contents
[ ]

To optimize PDF document for the web using Aspose.PDF Java for Python, simply invoke optimize_web method of  Optimize class.

Python Code


doc= self.Document()
pdf = self.Document()
pdf=self.dataDir + 'input1.pdf'

# Optimize for web
doc.optimize();

#Save output document
doc.save(self.dataDir + "Optimized_Web.pdf")

print "Optimized PDF for the Web, please check output file."

Download Running Code

Download Optimize PDF for Web (Aspose.PDF) from any of the below mentioned social coding sites: