# Optimize the output PDF file This topic describes how to optimize PDF file in the GroupDocs.Viewer Java API for web browser or to reduce size. GroupDocs.Viewer allows you to optimize the output PDF file for a web browser or to reduce the file size by optimizing resources. Optimization for a web allows a browser to display the first pages of a PDF file when you open the document, instead of waiting for the entire file to download. Resource optimization allows you to reduce the size of the output PDF file. While optimizing, GroupDocs.Viewer may reduce the image size or quality, remove notes or form fields, remove objects, fonts, or personal information from a document, and so on. You can also optimize an existing PDF file. To do this, open it, specify the optimization parameters, and save the output file. ## Contents - [Optimize a PDF file for a browser](https://docs.groupdocs.com/viewer/java/optimization-pdf-for-web.md) - [Optimize the PDF file resources](https://docs.groupdocs.com/viewer/java/optimization-pdf-resources.md) - [Optimize spreadsheets in a PDF file](https://docs.groupdocs.com/viewer/java/optimization-pdf-spreadsheets.md) - [Optimize images in Java](https://docs.groupdocs.com/viewer/java/optimize-images.md) - [Optimize content](https://docs.groupdocs.com/viewer/java/optimize-content.md) - [Optimize fonts](https://docs.groupdocs.com/viewer/java/optimize-fonts.md) - [Optimize the PDF file by removing unused resources](https://docs.groupdocs.com/viewer/java/optimization-pdf-remove-unused-resources.md)