Hello all,
I'm currently using the WordDocumentWriter to format and output a generated report, part of which contains a table that has two columns worth of images. The images are in .PNG format, sized 16x16 pixels, and are clear when I use them in other parts of my application. However, whenever I insert the images into the table cells, and view the document, the image is bad quality, very unclear and difficult to see detail on.
Here's the code I'm using to create the image cells:
Private Sub CreateTableImageCell(ByVal img As Image) writer.StartTableCell(_centercellprops) writer.StartParagraph() writer.AddInlinePicture(img) writer.EndParagraph() writer.EndTableCell() End Sub
Is there a setting on the WordDocumentWriter that will prevent the distortion of the images based on format type? Is there a better way to insert the image into the table cell that I'm unaware of, whether it be using a different file type for the image?
Any and all help/suggestions are appreciated.
Thanks!
Boris,
Thank you for the follow-up. The example you provided did work for what I was trying to accomplish, but because the image was of better quality and I think a higher resolution than what I was using. By increasing the DPI on the images I was using, the clarity of the image improved dramatically when being inserted into the table cell via the Documents writer.
Thanks,
Melissa
Hello,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
Hello medwards11,
I tried to reproduce your scenario and the image quality seems fine for me. Please take a look at my sample and please, if you feel that I misunderstood you in some way, make the necessary modifications to my project and send it back to me in your next post. I will be waiting for your feedback and will be happy to assist you further on that matter.