Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Can Aspose PDF API convert a web page to a PDF file

$
0
0
Hi,

I am looking for the API that can convert a web page to a pdf file by giving a URL. I saw the API sample as below:

String basePath = "C:/pdftest/";
com.aspose.pdf.HtmlLoadOptions htmloptions = new com.aspose.pdf.HtmlLoadOptions(basePath);
// use the new conversion engine
htmloptions.setUseNewConversionEngine(true);
// load HTML file
com.aspose.pdf.Document doc = new com.aspose.pdf.Document(basePath+"EmailDemo_updated.html", htmloptions);
// Save HTML file
doc.save("c:/pdftest/Web+URL_output.pdf");


Can I assign the basePath with a web URL, such as "http://www.myhost.com/mydir/"?
And then I want put a web page URL to new a pdf.Document:
     new com.aspose.pdf.Document(basePath + "MyPage.jsp", htmloptions);

Does it work for any web URL?

Thanks!


Viewing all articles
Browse latest Browse all 3131

Trending Articles