Follow this guide and learn how to convert documents to PDF with height, width, DPI, margins and other customizations using GroupDocs.Conversion for Java.... Define the desired page width (in pixels) of the output...conversion. Define the desired page height (in pixels) of the output...