PDF to docx conversion Alignment and font issues - Aspose.PDF for .NET

Hi Team,

While converting the PDF into docx file using aspose.pdf for .net package,the converted document has alignment issues and font mismatch in few places. The PDF has graphik font, in the converted docx file, it is getting replaced with other fonts in few places.

Please find the below code, passing the pdf file as stream and converting it to docx/doc with help of Aspose.pdf package. Kindly help on these issues.

Document document = new Document(stream);
document.DisableFontLicenseVerifications = true;
.
.
byte[] data;
using (var ms = new MemoryStream())
{
if (fileType.ToLower() == “docx”)
document.Save(ms, SaveFormat.DocX);
else
document.Save(ms, SaveFormat.Doc);
data = ms.ToArray();
}

return data;

Please find the attached the pdf file and highlighted issues on document.
Generated Document:
image003.jpg (20.2 KB)
Source PDF File:
IRCY11502477.pdf (115.5 KB)

@anandababu.annadurai

You need to have Graphik font installed in the system where conversion is happening. The API replaces the font with the nearest suitable font in case specific font is missing in the system. In case you have the fonts installed and still facing the issue, please share the font file for our reference. We will test the scenario in our environment and address it accordingly.

Hi Asad,

Thanks for your reply. The graphik font has been installed and it is working on the other parts of document (eg. The pet name,owner and doctor name). But in few places as highlighted in the attached image (eg. Received and reported Dates, Test Names and the number below to the Accession # etc) is being replaced with some other fonts and due to this alignment is also breaking.
image003.jpg (20.2 KB)

Attaching the source pdf again
IRCY11502477.pdf (115.5 KB)

@anandababu.annadurai

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-55985

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.

1 Like

Thank you for the response.We will wait for the updates…