Converting PDF to Word results in the loss of italic font formatting

When I try to convert a pdf file to word, italic font formatting is lost.

Aspose.Pdf.Document document = new Aspose.Pdf.Document(pdfPath);
Aspose.Pdf.DocSaveOptions saveOptions = new Aspose.Pdf.DocSaveOptions();
// Set the output format to DOCX
saveOptions.Format = Aspose.Pdf.DocSaveOptions.DocFormat.DocX;
// Optionally, set the recognition mode to Flow for better formatting
saveOptions.Mode = Aspose.Pdf.DocSaveOptions.RecognitionMode.Flow;
document.Save(wordPath, saveOptions);

Before convert
image.png (23.5 KB)

After convert
image.png (8.2 KB)

Use Test.pdf to reproduce this
Test.pdf (221.1 KB)

@mymbrooks

When converting a PDF file to a Word document using Aspose.PDF, it’s possible to encounter issues with font formatting, such as the loss of italic styles. To address this, you can utilize the DocSaveOptions class, which provides more control over the conversion process.

Here’s an example of how to implement this in your code:

using Aspose.Pdf;
using Aspose.Pdf.DocSaveOptions;

public static void PDFToWord(string pdfPath, string wordPath)
{
    // Load the PDF document
    Document document = new Document(pdfPath);
    
    // Create an instance of DocSaveOptions
    DocSaveOptions saveOptions = new DocSaveOptions();
    
    // Set the output format to DOCX
    saveOptions.Format = DocSaveOptions.DocFormat.DocX;
    
    // Optionally, set the recognition mode to Flow for better formatting
    saveOptions.Mode = DocSaveOptions.RecognitionMode.Flow;
    
    // Save the document to DOCX format
    document.Save(wordPath, saveOptions);
}

In this code, the DocSaveOptions allows you to specify the format and recognition mode, which can help preserve the formatting, including italic fonts, during the conversion process.

If you continue to experience issues with italic formatting, ensure that the fonts used in the PDF are embedded correctly. Sometimes, missing fonts can lead to formatting discrepancies in the output document.

For further assistance, you may want to check the documentation or explore similar issues discussed in the forum, as they might provide additional insights or solutions.

Thanks AI, I tried still the same

@mymbrooks

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): PDFNET-59239

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.