I’ve seen a simlilar error to this on you site which is, as yet, unfixed. However, I wanted to raise a new ticket as I’m not completely sure this is the same problem.
We have an Word document which contains paragraph numbering and when this is converted to PDF format the numbering changes. In the Word doc, the numbering resets to 1 at a certain point (which is correct) but in the PDF the numbering continues - in this case from 3 to 4.
This PDF doc is of cruicial importance to our business and is a legally binding contract. It must be relied upon to be as the initial Word document from which it is created.
Please advise as a matter of extreme urgency. the relevant sample doc’s are attached.
Thanks for your request. This is known issue #5949 in our defect database. I will notify you as soon as it is fixed. As a workaround you can refactor your document. If you need I can change the document and it will be converted to PDF properly. If so please provide me your e-mail.
This is such a serious error for us that we may have to try and find another conversion tool if Aspose cannot resolve it within the next couple of days.
In the meantime we’d be grateful if you could amend our source document so it converts to PDF correctly and provide us with an explanation of how we can do this ourselves for other doc’s.
My email address is registered with my Aspose account. I don’t want to post in on a public forum but can send it to you if you provide an address. Failing that, just post the doc’s in your reponse.
I have good news. Yesterday #5949 has been fixed. We are planning to issue a new release in a few days. Maybe even tomorrow. We’ll notify you when it is available.
We are sorry but PDF export module has some restrictions and we cannot promise 100% conversion fidelity for any arbitrary source documents. Inspecting particular cases we usually can figure out what features or techniques are better to avoid. So please feel free in asking our team for any help.
We are happy to tell you that we released new version of Aspose.Words. This version includes fix of issue you found earlier (issue # 5949). You can download new version from here:
Thanks for your request. In the current version of Aspose.Words (v6.0.0) there is two ways to convert DOC to PDF.
Direct conversion to PDF using Aspose.Words (without using Aspose.Pdf). See the following link for more information: Aspose.Total Product Family
here is code:
Document doc = new Document(@"Test012\number_error.doc");
doc.SaveToPdf(@"Test012\aw_out.pdf");
Another way is using Aspose.Words and Aspose.Pdf using the following code:
Document doc = new Document(@"Test012\number_error.doc");
//Save in intermediate AsposePdf format
MemoryStream aPdfStream = new MemoryStream();
doc.Save(aPdfStream, SaveFormat.AsposePdf);
//Create Aspose.Pdf.Pdf document
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.BindXML(aPdfStream, null);
//Save pdf
pdf.Save(@"Test012\out.pdf");
Could you please attach the document that causes the error?
I can’t provide the doc too easily as it’s being created on the fly, however, it works okay performing the conversion using Aspose.PDF (except for the paragraph numbering problem which this new release is supposed to address).
The API is confusing. Why is there a save type of ‘PDF’ if that can’t be used?
I’m happy to use the SaveToPDF method. I’ll respond if it doesn’t work.
Thanks for your request. The following code also works fine on my side:
Document doc = new Document(@"Test012\number_error.doc");
doc.Save(@"Test012\out.pdf", SaveFormat.Pdf);
You can try to save the generated document in DOC or DOCX format and attach it here for testing.
Regarding numbering issue:
The problem doesn’t occur when I use Aspose.Words (6.0.0) and Aspose.Pdf (3.9.0) to convert DOC to PDF. However the problem occurs if I use direct conversion to PDF using Aspose.Words. So I created new issue #6694 in our defect database.
Thank you for more information. Both methods works fine on my side. Could you please create simple test application that will allow me to reproduce the problem?
I updated to Aspose.PDF 3.9.0.0 (was using 3.8.0.5) and reinstalled Aspose.Words (as the old 5.2.0.0 assembly was still in the Net 2.0 folder) and all is fine now.