It seems bmp files do not convert correctly when converting from word to pdf? Anyone know why or how to fix it?
Hi
Thanks for your request. In the current version of Aspose.Words (v6.0.0) there is two ways to convert DOC (or other format) to PDF.
- Direct conversion to PDF using Aspose.Words (without using Aspose.Pdf). See the following link for mor einformation:
https://docs.aspose.com/words/net/convert-a-document-to-pdf/
here is code:
Document doc = new Document("in.html");
doc.SaveToPdf("aw_out.pdf");
- Another way is using Aspose.Words and Aspose.Pdf using the following code:
Document doc = new Document("in.html");
// 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("out.pdf");
Which one are you using? Also please attach your document for testing. I will try to reproduce the issue and provide you more information.
Best regards.
I am using aspose.word. Is there a difference between using doc.save(“file.pdf”) and doc.SaveToPdf(“file.pdf”)? I am using save…that is what the documentation I found said to use. I am at home and don’t have the document on me but to duplicate the problem all you need to do is take a large bmp file and insert it into a word document. A lot of our users just take screen prints and paste them into the word doc which is in a bmp format.
Let me know if this helps. Otherwise, I attach a file in the morning. Thanks!
Hi
Thank you for additional information. I tried to create such document but all works fine on my side. BMP image in the document is converted correctly. Please attach your document.
Best regards.
Is there a way I can send the file just to you?
Hi
Thanks for your request. Please se the following link to learn how to send file to my mail.
https://forum.aspose.com/t/aspose-words-faq/2711
Best regards.
I’ve attached the doc and the out put pdf.
Here is the code. I have also tried doc.Save.
// New a Doc object.
Document doc = new Document(TextBox1.Text);
doc.SaveToPdf(TextBox2.Text);
Hi
Thank you for additional information. I managed to reproduce the problem. It seems to be the known issue #6692 in our defect database. I will notify you as soon as it is fixed.
Best regards.
Does that mean it’s actively being worked on or that its on the list to be fixed? Any chance there is an estimate on when a soluton may be available?
Hi
Thanks for your inquiry. The issue is on the list to be fixed. Hopefully this issue will be fixed in the next release. Please expect a reply within 3-4 weeks.
Best regards.
Is there any update on when this fix will be available?
Hi
Thanks for your request. This issue is already fixed in current code base. I will notify you as soon as hotfix is released.
Best regards.