Free Support Forum - aspose.com

Aspose Words 15.2 Can't print inserted pictures

We have been using Aspose v13 on our servers with Word 2007. We have a project that opens and modifies a document using Aspose, including inserting a picture, and later is printed using Word.

We have updated Aspose to version 15.2 recently and since then when users print the document from Word (or create a PDF) the images don’t appear. They’re visible in Word window but they don’t appear when printing. They do appear if we use Word 2013 instead of Word 2007 but we don’t have the option to upgrade at present.

In the attached document there is an image inserted with Aspose v15.2 that is set to be “In line with text” in the text wrapping options. By opening that document with Word 2007, selecting the image and selecting copy and paste you get a copy of the image which is also “in line with text” but it seems to have different properties. When you print this document only the copied and pasted picture prints out, the original one does not. There is a very slight difference in the images if you look at the word document, the one that prints properly has a dotted line around the image, the one that doesn’t print has a solid line.

By doing the same process using Aspose v13 the image appears “In line with text” but it prints out without a problem.

We tried to save the document using the tip given in the forum http://www.aspose.com/community/forums/thread/337220/aspose-words-docx-saved-but-when-opened-in-word-open-in-compatibility-mode.aspx but still didn’t work.

Please advise if there is something we need to do to make the images print again?

Thanks

Hi Ross,

Thanks for your inquiry. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11733. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Secondly, I tested with Aspose.Words for .NET 13.2.0 but the problem is still reproducible on my side. Could you please tell us the exact version of Aspose.Words for which you're getting good results on your end?

Best regards,

Hi, The version it worked on was 13.5

Thanks

Hi Ross,

Thanks for your inquiry. I am afraid, I was unable to reproduce this issue with 13.5.0 when doing the following steps:

  1. Convert 'AsposePrintPictureProblem.docx' to '13.5.0.docx' using Aspose.Words 13.5.0
  2. Open '13.5.0.docx' with MS Word 2007
  3. There is an image inside '13.5.0.docx'
  4. Copy it an paste it at the end of document
  5. Save it as DOCX using MSW 2007
  6. Reopen this new DOCX (see 13.5.0-resaved-by-msw2007.docx)
  7. Print to 'Microsoft XPS Document Writer' (see printed-by-msw2007-13.5.0.xps)
  8. There is only one image printed. One image is visible in MSW 2007 but again is lost in printed file.

Best regards,

Hi,



I think the reason you can’t reproduce is that you are using the document I supplied. That document has the image in it inserted with 15.2 so it won’t print the image - this is the bug.



To reproduce the issue (or not with 13.5), you need to take a clean new word document, use Aspose Words 13.5 to insert the image and save the file, then open it in word and print it. The image will print out.



The file I attached was created with 15.2 and demonstrates the bug.



Regards

Ross

Hi Ross,


Thanks for the details. Unfortunately, I was still unable to reproduce this issue with 13.5.0. MS Word 2007 can still print both images to ‘XPS Document Writer’ printer no matter 13.5.0 or 15.3.0 versions of Aspose.Words are used. Please provide complete steps which help us to observe this regression during 13.5.0 to 15.3.0 transition. Thanks for your cooperation.

PS: please check attached ‘15.3.0-2007.docx’. This document was generated using Aspose.Words 15.3.0 and after copying image, re-saved by MS Word 2007. Please try printing this document using MS Word 2007 on your end to try find out how many images it prints.

Best regards,

Hi Awais,



I think the issue only presents if the word document starts as an office 2003 document, the image is inserted and then the document is saved as an Office 2007 document with compatability mode checked. I’ve attached a document from 2003 for you to test with.



It seems that when the document is a word 2003 document, the Aspose code inserts a shape object rather than a drawingML object - the latter prints, the former doesn’t.



If you save as DocX without the compatibility checkbox the picture then prints.



Thanks,

Ross

Hi Ross,


Thanks for the details. We have logged a comment against your issue and will inform you as soon as it is resolved.

Best regards,

Hi Ross,


Thanks for being patient.

The original document contains VML and when copy-pasted in word (see attached 15.3.0-resaved-by-msw2007.docx) the image is pasted as DrawingML. This might be the cause of the issue. We have no control of MS Word but we give choice which technology will be used for image insertion VML or DML.

Presently Aspose.Words.DocumentBuilder inserts images as DrawingML by default, but also supports VML for legacy purposes. So you can recreate the document and set Document.CompatibilityOptions.OptimizeFor to 2007 or prior to insert images as VML.

Please try both VML and DML ways and report results here for our reference. Thanks for your cooperation.

Best regards,

Hi Ross,


Regarding WORDSNET-11733, our product team has completed the work on your issue and has come to a conclusion that this issue and the undesired behaviour you’re observing is actually not a bug in Aspose.Words. So, we have closed this issue as ‘Not a Bug’. Please see my previous reply for description.

Best regards,