libskiasharp required for document.UpdateTableOfContents?

Has anyone got DocIO Table of Contents updating on Blazor Webassembly?

I can build a document and insert a table of contents.  When I run UpdateTableOfContents I get a "system.dllnotfoundexception libskiasharp"

That's for code running in the client project.  I wondered if I moved it to the Server part of my WebAssembly project, whether that might work.  but just seeing what success others have had

Thanks  

3 Replies 1 reply marked as answer

LB Lokesh Baskar Syncfusion Team April 20, 2021 11:57 AM UTC

Hi Rob,

Thank you for contacting Syncfusion support.  

In DocIO, UpdateTableOfContents API internally uses Word to PDF conversion process in Blazor. During Word to PDF conversion, internally DocIO performs measuring techniques to layout the each contents and render into PDF. DocIO uses SkiaSharp graphics library as dependent to perform Word to PDF conversion in Blazor. The mentioned problem is related to SkiaSharp graphics library only. Using SkiaSharp graphics library in Blazor webassembly project is already known limitation at our end. Essential DocIO does not provide support for converting Word to PDF in Client side application.

We suggest you to use Blazor server side application to achieve this requirement at your side. Please refer the below UG documentation link for more information. 
https://help.syncfusion.com/file-formats/docio/supported-and-unsupported-features#blazor-supported-features

Please refer the below link to know more about updating table of contents in Server-side application. 
https://blazor.syncfusion.com/demos/docio/table-of-content?theme=bootstrap4

Please let us know if you have any other questions.


Regards,
Lokesh B 




RO Rob April 20, 2021 01:53 PM UTC

I moved the class to the server part of the Blazor WASM project and pulled the word document back through gRPC.  

So didn't need to move to a proper Blazor Server project, just wondered whether anyone had any success with some of the SkiaSharp.NativeAssets.WebAssembly or UNO packages.

Thanks for the update


LB Lokesh Baskar Syncfusion Team April 21, 2021 04:57 PM UTC

Hi Rob, 

Thank you for your update.

In Blazor, to update TOC in a Word document we recommend you to use Word to PDF assemblies(S)(
Syncfusion.DocIORenderer.Portable) or NuGet as a reference in your application.

In UpdateTableOfContents(), internally we updated.the page numbers of table of contents using Word to PDF layout engine. So, to update the page numbers in the table of contents, we need Syncfusion.DocIORenderer.Portable  assembly.

Please refer the below links to know more details.
 
 
 

Regards
 
Lokesh B 


Marked as answer
Loader.
Up arrow icon