DOCX conversion to PDF issues

Discussions about Office OpenXML & Open Document formats support.
Post Reply
reisrf
Posts: 25
Joined: Thu May 28, 2015 4:30 pm

DOCX conversion to PDF issues

Post by reisrf » Mon Jul 23, 2018 12:31 am

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;
}
Attachments
DOCXPDFGDPICTURE.docx
(140.81 KiB) Downloaded 34 times

tpontow
Posts: 2
Joined: Tue Jan 21, 2014 6:20 pm

Re: DOCX conversion to PDF issues

Post by tpontow » Wed Nov 28, 2018 2:59 pm

Hi GdPicture,

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

Thorsten Pontow

Gabriela
Posts: 277
Joined: Wed Nov 22, 2017 9:52 am

Re: DOCX conversion to PDF issues

Post by Gabriela » Mon Jan 21, 2019 1:20 pm

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.
Kind regards,

Gabriela
GdPicture Team

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest