Embed font in PDF from C# resource file

Posted by: aeon512 on 14 September 2017, 7:18 pm EST

    • Post Options:
    • Link

    Posted 14 September 2017, 7:18 pm EST

    [activereports_archive]Hi,

    I would like to embed a font in the created PDF as described here

    http://arhelp.grapecity.com/groups/topic/creating-a-pdf-with-embedded-font/

    but the font is only available within the resource of the C# application.

    Hence, I can’t refer to this font by its name nor by its filename.

    Is there any solution for this usage scenario available?

    Thanks[/activereports_archive]

  • Posted 14 September 2017, 7:18 pm EST

    [activereports_archive]Hello

    In ActiveReports11, you may embed fonts in exported pdf file by using “AddFontLink” attribute in App.Config/web.config file. Here is a documentation link that may help you: http://arhelp.grapecity.com/webhelp/AR11/index.html#PDFCustomFontFactory.html

    All you would need to do is just add a Folder “Fonts” and add your font to it.

    Let me know if this does not resolve the issue.

    Regards

    Ruchir Agarwal

    [/activereports_archive]

  • Posted 14 September 2017, 7:18 pm EST

    [activereports_archive]Thanks.

    But since the fonts are already embedded in my C# application within the resource file - can I reuse them?[/activereports_archive]

  • Posted 14 September 2017, 7:18 pm EST

    [activereports_archive]Hi

    I am discussing this use case with the concerned team and will let you know as I receive information from them.

    Also, would it be possible for you to create a Folder in your c# application and add the font (embedded in Resources file) to the newly created folder?

    Thanks & Regards

    Ruchir Agarwal[/activereports_archive]

  • Posted 14 September 2017, 7:18 pm EST

    [activereports_archive]My goal is to avoid storing the fonts externally on our customers environment.[/activereports_archive]

  • Posted 14 September 2017, 7:18 pm EST

    [activereports_archive]Hello,

    I have attached a sample application demonstrating how to use fonts residing inside applications’ “Resources” to get embedded in exported pdf file.

    For this we have used the “AddFontLink” property and passed the Resources path where Font resides using “AddFolder” property in the App.Config file.

    Also, you would need to use the ActiveReports11 build version “11.1.10036.0” for implementing this. You may download this build version from here: cdn.grapecity.com/ActiveReports/ar11/hotfixes/ActiveReports-v11.1.10036.0.msi

    For detailed information, please refer to following Documentation link: http://arhelp.grapecity.com/webhelp/AR11/index.html#PDFCustomFontFactory.html

    Thanks & Regards

    Ruchir Agarwal[/activereports_archive]

    2017/05/FontFactoryTester.zip

  • Posted 14 September 2017, 7:18 pm EST

    [activereports_archive]Thanks a lot, that helps a lot.[/activereports_archive]

  • Posted 3 July 2018, 9:48 am EST

    You can try ZetPDF.com which is a great tool to used for.

  • Posted 28 January 2019, 1:39 am EST

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels