I'm trying to convert a docx file to pdf with the latest Spire.Doc version.
It works fine for other files.
But the attached file with specific formats produce a pdf, which is not scrollable in the web browser (Chrome).
I also tried to convert the file with Word and it was sucessful.
Attached is the docx file and the resulting pdf.
Thanks in advance
- Code: Select all
using (MemoryStream wordStream = new MemoryStream(wordBytes)))
{
Document document = new Document();
document.LoadFromStream(wordStream, FileFormat.Docx);
using (MemoryStream pdfStream = new MemoryStream())
{
ToPdfParameterList tpl = new ToPdfParameterList
{
UsePSCoversion = true
};
document.SaveToStream(pdfStream, tpl);
return pdfStream.ToArray();
}
}