Byte to pdf

I recently purchased the aspose.word and aspose.pdf.
I have a form which lets users upload documents and I want to convert the word docs to pdf without saving them on the disk.
According to your forum, this method should work but

/// Converts document to PDF and returns PDF document's bytes.
private byte[] DocumentToPdfBytes(Document doc)
    byte[] pdfBytes;
    using(MemoryStream pdfStream = new MemoryStream())
        doc.SaveToPdf(0, doc.PageCount, pdfStream, null);
        pdfBytes = pdfStream.ToArray();
    return pdfBytes;

but the dll does not have any doc.SaveToPdf option

Please advice

This message was posted using Aspose.Live 2 Forum


Thanks for your request. SaveToPdf method is available starting from Aspose.Words 6.0.0. Which version of Aspose.Words do you use for testing? To check version of the library, right click on the dll, select Properties from the context menu, then select Version tab. You will see File version.
Best regards,