We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word to PDF linked image filename

Hello,
Is there a way when creating the XML file that the Image File can show the filename of the linked image instead of creating a new image and pointing to the new image?
What I get:

<Image File="J:\New\test.001.png" Type="png" IsImageNotFoundErrorIgnored="true" FixWidth="215.65" FixHeight="188.63" />

What I want:

<Image File="J:\New\somefolder\linkedImageName.emf" Type="emf" IsImageNotFoundErrorIgnored="true" FixWidth="215.65" FixHeight="188.63" />

I thought there was a way to do this by linking the image in Word, but I cannot get it to work, every attempt I’ve made always creates a test.001.png file.
Thanks,
Crispy

Hello Crispy!
Thank you for your inquiry.
In current implementation Aspose.Words resolves all local links to files and copies their targets to the image output directory. Links to the Internet are written as they are.
Also Aspose.Words converts metafiles to raster images when exports to Aspose.Pdf XML format. This is done because Aspose.Pdf has some difficulties with metafiles. They can be rendered but less accurately. There is no option to control this. Creating a PDF with links rather than embedded images is an uncommon case.
It’s possible to suggest a workaround. You can postprocess the intermediate output substituting references to just created image files with original links. Note that you need to control lifetime of the originally written files yourself since Aspose.Pdf won’t delete them after conversion. Of course it is easy only in special case when you know what files are copied with a particular document. General case could be more complex because it is needed to find the links in the document model and match them to files output by Aspose.Words.
Regards,