Page 1 of 1

DOCX conversion to PDF issues

Posted: Mon Jul 23, 2018 12:31 am
by reisrf
I have tried a small piece of code I have got here in the blog to convert DOCX to PDF and I have tried. It works fine, it creates the PDF but the "look" of the contents is not the same as in the DOC. For instance, I can see some squares on every bullet that don´t exist in the original document. Lines in PDF that don´t exist in the DOC. Lines in the DOC that are not in the PDF. I have attached a document showing the errors I have found.

I am using 14.0.0.52. Were these errors solved in some latest version? Is there some workaround? The piece of code to convert I am using is:

public bool ConvertDocxToPDF (string inputFile, ref string errorMessage)
{
try
{
byte[] docx = File.ReadAllBytes(inputFile);
GdPictureDocumentConverter converter = new GdPictureDocumentConverter();
var status = converter.LoadFromStream(new MemoryStream(docx), GdPicture14.DocumentFormat.DocumentFormatOpenXMLWord);

if (status == GdPictureStatus.OK)
{
MemoryStream pdfdocument = new MemoryStream();
status = converter.SaveAsPDF(inputFile.Replace(".docx", ".pdf").Replace(".doc",".pdf"),PdfConformance.PDF);

if (status != GdPictureStatus.OK)
{
return false;
}

return true;
}
else
{
return false;
}
}
catch (Exception ex)
{
return false;
}

Re: DOCX conversion to PDF issues

Posted: Wed Nov 28, 2018 2:59 pm
by tpontow
Hi GdPicture,

any new information about this issue? I have the same Problem with my word document.

Thorsten Pontow

Re: DOCX conversion to PDF issues

Posted: Mon Jan 21, 2019 1:20 pm
by Gabriela
Hi,

we are sorry for that delay. May I ask you to provide us with the original DOCX file if it is possible? We need to reproduce the behaviour here in order to find those conversion issues. Or you can open a ticket on our support platform directly.
https://www.gdpicture.com/support/getti ... -our-team/
Thank you.