Issue with Docx to PDF Conversion - Urgent Attention Required

Dear Aspose Team,

I hope this email finds you well. We are writing to bring to your attention an issue we have encountered with the Docx to PDF conversion using Aspose Word license (Developer Owned).

The problem arises when attempting to convert a Docx file containing a single image into PDF format. While the conversion process itself seems to work without any apparent errors, we have observed an unexpected behavior upon opening the resulting PDF file in Adobe Illustrator.

Specifically, when selecting the image within the PDF file using Adobe Illustrator, it appears to be selected as a full-page image rather than just the individual image object. Consequently, when attempting to save the PDF, only the selected full-page image gets saved, instead of the intended single image.

To help you better understand and address this issue, we have attached a sample input Docx file along with the corresponding converted PDF files.

We kindly request your prompt assistance in investigating and resolving this matter. If any specific properties need to be set during the conversion process to rectify this behavior, please advise us accordingly.

Thank you for your attention to this matter. We look forward to your earliest response and resolution of this issue.

Figure 1.docx (2.2 MB)

Figure 1_Adobe_print.pdf (5.9 MB)

Figure 1_aspose.pdf (1.5 MB)

Figure 1_saveas.pdf (479.6 KB)

Regards,
Mani

@bmanitn1 Your input document contains a EMF metafile image. While rendering the document to PDF Aspose.Words by default renders metafile as a vector image, so in the output there are several objects instead of one single image. If t is requires to render the metafile as a single raster image in the output PDF document, you can instruct Aspose.Words to do so. Please see the following code:

Document doc = new Document("C:\\Temp\\in.docx");
        
PdfSaveOptions opt = new PdfSaveOptions();
opt.getMetafileRenderingOptions().setRenderingMode(MetafileRenderingMode.BITMAP);

doc.save("C:\\Temp\\out.pdf", opt);

Dear Aspose Team,

Thank you for your guidance. We implemented the provided code snippet, but unfortunately, the issue persists. The EMF metafile image is still being treated as a full-page image in Adobe Illustrator, and vector images are being converted to raster images in the PDF output.

We kindly request further assistance in resolving this matter, ensuring that the EMF meta file image is correctly treated as a single image object in the PDF, and vector images remain unchanged.

Regrads,
Mani

@bmanitn1 Unfortunately, there is no way to export EMF metafile as a single vector image to PDF. It can be exported either as vector drawing, i.e. multiple objects with be there, or as a single raster image as shown in the code example above. This is not Aspose.Words restriction, this is PDF file format limitation, there is no way to keep vector image as single object in PDF format.

Thank you for your response. I understand that there may be limitations in exporting EMF metafile as a single vector image to PDF, which could result in the entire page being included in the output PDF.

To clarify, my expectation is that only the selected portion of the image should appear in the output PDF, similar to the functionality achieved by Adobe Print PDF. I will investigate further to determine if there are any options or configurations that can be adjusted to ensure this desired outcome.

Your clarification regarding the limitations of exporting EMF metafile to PDF is noted, and I appreciate your insights on this matter. In the meantime,

please find the attached PDF screenshot files for your reference

Figure1_Adobe_print:

Figure1_aspose:

Regrads,
Mani

@bmanitn1 The code provided above produces the same result as you expect:


out.pdf (599.2 KB)