Trying to Convert xlsx file to PDF using nodejs ‘@pdftron/pdfnet-node’.
Attached the code reference as well as the diff in UI and converted PDF. Can you please let us know how to embed the fonts so that it can be uniform across the UI and conversion
Even I tried to create the docx file with the xlsx content and stored with the embedded fonts using word. Then I have provided the doc file as “PDFNet.AddResourceSearchPath()” and via “OfficeToPDFOptions.SetResourceDocPath()” Tried both . Its also not converting the PDF as it is .
Is “pdftron_smart_substitution.plugin” available for nodejs , if available can you please let me where to get the plugin for this.
The only way to truly guarantee that the font will be preserved in by embedding the font directly. Unfortunately, MS Excel does not explicitly support embedding fonts. The following article explains why this is the case and proposes a workaround:
That said, without using some workaround to embed fonts within Excel, we cannot guarantee the proper font will be used.
According to the following documentation - Apryse Documentation | Documentation - Calling WebFontDownloader.setCustomWebFontURL and WebFontDownloader.enableDownloads allows the converter to download the fonts if the fonts are not available on the system where Excel to PDF conversion is being done using PDFNet SDK. Even if we call the APIs before calling the office2PDFBuffer API - the fonts are not downloaded and used. Is this expected behavior?
Just FYI - for webviewer - we are using Core.setCustomFontURL API passing the exact path as we pass to the WebFontDownloader.setCustomWebFontURL mentioned above and it is able to download the font and render the Excel correctly.
You mentioned above that you tried creating the DOCX file with XLSX content and stored the embedded fonts.
Instead, could you please try substituting the fonts with the DOCX file and then make the conversion to PDF?
Here is a forum post with a similar issue: