Word to PDF - Guid should contain 32 digits

NameValueType
$exception{"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."}System.FormatException

   at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID)
   at System.Guid.TryParseExactN(ReadOnlySpan`1 guidString, GuidResult& result)
   at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result)
   at System.Guid..ctor(String g)
   at Syncfusion.DocIO.DLS.FontSettings.DeObfuscateFont(Stream font, MemoryStream outStream, String fontGuid)
   at Syncfusion.DocIO.DLS.FontSettings.EmbedDocumentFonts(WordDocument document)
   at Syncfusion.DocIORenderer.DocIORenderer.ConvertToPDF(WordDocument wordDocument)



Attachment: nbbjaarrekeningbart_a253fd33.zip

6 Replies

MR Manikandan Ravichandran Syncfusion Team May 26, 2020 11:49 AM UTC

Hi Bart,

Thank you for contacting Syncfusion support.

We can reproduce the mentioned issue with “System.FormatException while converting word document to PDF” at our end. We suspect this could be a defect and We will validate and update you with more details on this on 28th May 2020.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran



MR Manikandan Ravichandran Syncfusion Team May 27, 2020 03:21 PM UTC

Hi Bart,

Thank you for your patience.

On further analysing, we found that the document has embedded font but there is no font key (GUID) available. So that mentioned exception was thrown. So, could you please share the details about how this Word document was created? It will be very useful to proceed further on this validation.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran 



BD Bart de keersmaeker May 27, 2020 03:46 PM UTC

Dear,

We offer our solution to a broad audience, so we don't have control how certain documents are created.
Can we exclude in some way the embed font extraction ? 
Or can we disable the exception and have a look at the document afterwards ? So we can figure out why it does crash. 


VR Vijay Ramachandran Syncfusion Team May 28, 2020 11:03 AM UTC

Hi Bart,

Thank you for your update.

Yes, we will exclude font extraction when there is no valid font key available. We have planned to include this implementation on our upcoming 2020 Volume 2 release which is expected to be available on June 2020. You can track the status of this bug using following link.
https://www.syncfusion.com/feedback/14778/system-formatexception-while-converting-a-word-document-to-pdf

You can find the result document from here, which is generated after excluding the exception.

Regards,
Vijay Ramachandran 



BE Ben March 12, 2021 11:22 AM UTC

Hi,

We hit a similar issue with a document containing "Museo Sans" as an embedded font:


Cannot access a closed Stream.: ObjectDisposedException
at System.IO.MemoryStream.set_Position(Int64 value)
at Syncfusion.DocIO.DLS.FontSettings.DeObfuscateFont(Stream font, MemoryStream outStream, String fontGuid)
at Syncfusion.DocIO.DLS.FontSettings.EmbedDocumentFonts(WordDocument document)
at Syncfusion.DocIORenderer.DocIORenderer.ConvertToPDF(WordDocument wordDocument)


Would it be possible to either remove the font or ignore the error and use normal font substitution?


MJ Mohanaselvam Jothi Syncfusion Team March 15, 2021 10:27 AM UTC

Hi Ben,

Thank you for contacting Syncfusion support.

We have tried to reproduce the reported problem using the given details, but it works properly at our end. For your reference we have attached the Word document and the generated PDF at our end.
Please find the documents from the below link:
https://www.syncfusion.com/downloads/support/forum/154567/ze/Documents1423557793

We have converted the Word document to PDF using the above input document and the ASP.NET Core code snippet.

We suspect that the reported problem might be due to the file level information in the input Word document which used at your end. So, to analyze further on the reported problem in line with your requirement, could you please provide us the following things from your end: 
  1. Input Word document .
  2. Code snippets to reproduce the issue.
  3. Syncfusion product version used at your end.

Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face.

Based on the above details, we will analyze further at our end and provide you the appropriate solution at the earliest.

Please let us know if you have any other questions.

Regards,
Mohanaselvam J 


Loader.
Up arrow icon