The SaveAsPDF method reports a "GenericError" when converting a word document to a pdf document

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
stoneyuan
Posts: 1
Joined: Thu Dec 08, 2022 8:06 am

The SaveAsPDF method reports a "GenericError" when converting a word document to a pdf document

Post by stoneyuan » Thu Dec 08, 2022 8:19 am

The SaveAsPDF method reports a "GenericError" when converting a word document to a pdf document.The word document is uploaded to the Attachments.The code is as follows:
bool convertSuccess = false;
try
{
string license = System.Configuration.ConfigurationManager.AppSettings["DocuViewareLicense"];
if (!string.IsNullOrEmpty(license))
{
DocuViewareLicensing.RegisterKEY(license);
}

using (GdPictureDocumentConverter convert = new GdPictureDocumentConverter())
{
GdPictureStatus status = convert.LoadFromFile(documentPath, GdPicture14.DocumentFormat.DocumentFormatUNKNOWN);

if (status == GdPictureStatus.OK)
{
status = convert.SaveAsPDF(convertPath, pdfConformance);
if (status == GdPictureStatus.OK)
convertSuccess = true;
}
}
}
catch (Exception ex) {
logger.WriteLine("GDPictrue DocuViewareLicensing ConvertDocumentToPDF Method Error:" + ex.Message);
}

return convertSuccess;
Attachments
Offer Letter_136_Dec_07_2022.docx
Failed to convert the document to PDF
(304.58 KiB) Downloaded 258 times

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: The SaveAsPDF method reports a "GenericError" when converting a word document to a pdf document

Post by Fabio » Fri Dec 16, 2022 12:38 pm

Hello,

I tried your code snippet on our latest version and everything seems to work fine.
bugconvertdocx.png
Could you try to update your SDK to the latest version and tell me if the issue still occurs, please?

Best regards,
Fabio

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest