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

Free Support Forum - aspose.com

Aspose but need to store that PDF file into a physical location

I need a small technical help on Java Components, below is the details :

  1. Do you have any on fly conversion of word documents to PDF document? Because I am successfully able to convert the word file into PDF file using Aspose but need to store that PDF file into a physical location.
  2. If point# 1’s answer is yes, should we open the same on fly PDF document into the browser(Without saving into any of the physical location).
    It is really appreciable, If you will guide me on the above points.
    thx. irfan.

Hi Irfan,

Thanks for your inquiry. Yes, you can convert MS Word document to Pdf at physical location and Stream by using Aspose.Words. Please read following documentation links for your kind reference.
https://docs.aspose.com/words/java/convert-a-document-to-pdf/
https://docs.aspose.com/words/java/save-a-document/

Secondly, you can send output Pdf file to the client browser. You need to implement an HTTPServlet before you can send the document to the browser. You can find a demo example with full code in the demo folders that are included with the install file for Aspose.Words Java. This is located where you installed the java version, inside “\Demos\Aspose.Words.Demos.Web”.

Please also check the Java Examples from here:
https://demos.aspose.com/

Using the servlet you can send the document to a browser like in the example code below which sends a .pdf file to the browser.

response.setContentType("application/pdf");
doc.save(response.getOutputStream(), SaveFormat.PDF);