Skip to content

Make text BOLD and ITALIC or BOTH when creating PDF #3956

Discussion options

You must be logged in to vote

To start with insert_htmlbox:

  • There is no parameter in the method directly to use a certain font of desired characteristics. You must use HTML / CSS syntax to select a font of your liking. As for the standard variations, you can simply specify the HTML construct <b>bold text</b>. The MuPDF Story behind the method will locate a suitable / available font. Same is true for semi-bold etc.: use CSS syntax to define a @font-face.
  • As is true for all text insertions, outputting exactly the same text and a rectangle with exactly the same width and height, plus a small (!) shift will simulate bold or even character shading.

In addition to the previous, Page.insert_text()/Page.insert_textbox() als…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rafayaar
Comment options

@JorjMcKie
Comment options

Answer selected by rafayaar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants