Hi Team,
Hi Jyothi,
Thanks for your inquiry. Aspose APIs support to load documents from streams and save to streams as well. So you can save PDF output from Aspose.Cells and Aspose.Words to stream, and later can concatenate multiple PDF streams into a single stream. Please check following documentation link for concatenation PDF streams.
Please feel free to contact us for any further assistance.
Best Regards,
Hi Ahmad,
Hi Jyothi,
// Load the document from disk.<o:p></o:p>
Aspose.Words.Document doc = new Aspose.Words.Document(DocMemoryStream);
MemoryStream pdfMemoryStream = new MemoryStream();
// Save the document in PDF format.
doc.Save(pdfMemoryStream,Aspose.Words.SaveFormat.Pdf);
Please feel free to contact us for any further assistance.
Best Regards,
Thank You !!
Hi Jyothi,
Hi ahmad
The code snippet is not working for me while saving the document as pdfmemorystream.
import com.aspose.pdf.internal.imaging.system.io.MemoryStream;
Document doc = null;
MemoryStream pdfMemoryStream = new MemoryStream();
System.out.println("aspose operations ");
switch (extension) {
case “docx”:
System.out.println("in doc case : ");
try {
doc = new Document(docStream);
PdfSaveOptions options = new PdfSaveOptions();
options.setCompliance(PdfCompliance.PDF_A_1_B);
//doc.save(newPath,options);
doc.save(pdfMemoryStream, SaveFormat.PDF);
} catch (Exception e) {
System.err.println(e);
}
Please help …
It seems like you are trying to load a .doc/.docx file in Document(). Please note that Aspose.PDF does not support Word to PDF conversion. You can however convert a PDF into DOC/DOCX using the API. Please let us know in case we have missed something and share your sample source file with us. We will further proceed to assist you accordingly.