We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose-PDF Java- HTML to PDF

Hi,
I am converting an HTML file to PDF using aspose PDF.
I want to increase the page size to A2 and the contents of the HTML should also scale up accordingly. But this is not happening right now.
Following is the current code. Can you tell me the appropriate code changes.

HtmlLoadOptions options = new HtmlLoadOptions();

    // Initialize document object
    Document document = new Document(filePath, options);
    // Save output PDF document
    document.save(this.destinationFilePath);

@pranavkhedkar1512

Please read the following article about changing the page size.
Change PDF Page Size Programmatically

If you still face problem, please ZIP and attach your input HTML and output PDF files here for testing. We will investigate the issue and provide you more information on it.