Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9289295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:08:32+00:00 2026-06-18T20:08:32+00:00

I’m converting a C# app page which uses PdfSharp to iTextSharp & have found

  • 0

I’m converting a C# app page which uses PdfSharp to iTextSharp & have found a line of code I can’t see an obvious replacement for.

The existing code is

PdfSharp.Drawing.XPdfFontOptions options = new  PdfSharp.Drawing.XPdfFontOptions(PdfFontEncoding.Unicode, 
PdfFontEmbedding.Always);

Also, what if I want to use other, non-base fonts? I can see from the docs how to create one of the 16 types, however what if I want “Frutiger LT 45 Light”?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:08:33+00:00Added an answer on June 18, 2026 at 8:08 pm

    Have a look at the examples from iText in Action — 2nd Edition Chapter 11: Choosing the right font; the .Net versions are available here.

    You’ll see that fonts can be selected, configured, and used like this:

    public const string FONT = "c:/windows/fonts/arialbd.ttf";
    BaseFont bf = BaseFont.CreateFont(FONT, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
    Font f = new Font(bf, 12);
    document.Add(new Paragraph("Text", f));
    
    Font garamondItalic = FontFactory.GetFont(
      "Garamond", BaseFont.WINANSI, BaseFont.EMBEDDED, 12, Font.ITALIC
    );
    document.Add(new Paragraph("Garamond-Italic", garamondItalic));
    

    Thus, you explicitly enter the encoding and embedding options in the font creation instead of via some font option object.

    BTW, here BaseFont does not refer to the standard 14 fonts which shall be available to the conforming reader according to ISO 32000-1:2008 (I assume that you mean those fonts when you talk about the 16 types) but instead is a base object from which fonts at given sizes are created.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Let's say I'm outputting a post title and in our database, it's Hello Y’all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.