Our line of business application uses a Word document as a template, fills in the pertinent information and converts it to PDF, which it returns to the user.
That all works fine except for one thing. We use an image of our company's logo on the lead page and in the footer. In one resolution (e.g. 100%), it looks fine. But at higher resolutions (e.g. 250%), it has several noticeable jaggies; the diagonals have noticeable ragged edges. Tweaking the image, we're able to make it look good at the higher zoom value, but then it looks terrible at lower zoom values.
Currently, we're using a PNG, but we've tried JPG and it doesn't improve the jaggy problem. In fact, it looks worse at higher resolution because of JPG compression. I think a vector image would solve the problem (and we have the logo in vector format), but I haven't found any vector formats that Word supports.
I don't really have any code to show, since we don't do anything with the image in the code: we just take the document and plug in our values, none of which touch the logo (the template already contains the image).
We are using Word 2013 (32-bit) on Windows 8.1 (though some of our developers use Windows 7). We use the .NET PdfDocument class to generate the PDF.
Any ideas on how to get Word to be better at retaining image quality? Or is this a PDF issue?
The suggestion by David van Driessche might still work, provided the right EMF is used. EMF files can contain both raster and vector data. With a raster EMF file, the same problem will present itself as it did with PNG or JPEG. Vector EMF embedded in Word files can scale very nicely, at least when zoomed in display, so it could also work with printing or converting to PDF.
Word supports both raster and vector objects within EMFs, so the secret is to use EMFs that only contain scalable objects like lines, curves and text when quality & scaling are both concerns.
I have posted sample files here to illustrate this for anyone wishing to see the difference.
Amin Dodin