Hello, we are using Aspose.Words to convert PDF to Word, however, there are cases that are not the same like images… Attached here is the sample PDF file generated.
Test Extened Image.pdf (752.8 KB)
And here’s the Word file generated base from the PDF…
Test Extened Image (11).docx (408.2 KB)
The process was from PDF stream and convert it to DOCx using Aspose.Words…
@kdepadua
When converting a PDF to a Word document using Aspose.Words, discrepancies in rendering, particularly with images, can occur due to various factors such as the complexity of the PDF structure or the way images are embedded in the PDF.
To convert a PDF to a DOCX file, you can use the following approach:
- Load the PDF document using the
Document
class from Aspose.Words.
- Save the loaded document in the DOCX format.
Here is a sample code snippet demonstrating this process:
using Aspose.Words;
class Program
{
static void Main()
{
// Load the PDF document
Document pdfDocument = new Document("path/to/your/input.pdf");
// Save the document as a DOCX file
pdfDocument.Save("path/to/your/output.docx");
}
}
If you are experiencing issues with images not rendering correctly, consider the following tips:
- Ensure that the images in the PDF are not overly complex or high-resolution, as this can affect the conversion quality.
- Check if the images are embedded properly in the PDF. Sometimes, images may be linked rather than embedded, which can lead to issues during conversion.
- Experiment with different save options or settings in Aspose.Words to see if they improve the output quality.
If the problem persists, you may want to provide a sample PDF file for further analysis, as specific cases can vary significantly based on the content and structure of the PDF.
For more detailed examples and options, you can refer to the Aspose documentation or explore the provided code examples in the Aspose GitHub repository.
Sources:
[1]: ExPdf2Word.cs
@kdepadua
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-27719
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@alexey.noskov does Aspose ignores the overflow:hidden css? because the image should be cropped but it still renders the whole…
@kdepadua CSS is not related to PDF documents. We will analyze the problem and let you know once it is resolved or we have more information for you.