How to bold a text in PDF?

后端 未结 1 1093
青春惊慌失措
青春惊慌失措 2021-01-06 09:02

I\'m developing a new function to \"my\" program. This function is able to write PDF files by the simple way, making a simple text file with some codes of PDF standard.

相关标签:
1条回答
  • 2021-01-06 09:28

    PDF is not like HTML where you can apply formatting tags for emphasis. As you've read in the PDF reference, all that you do in PDF is to setup a graphics environment (colours used, fonts used, etc) and then put text on the page.

    If you want to have something show in bold, use a font that is bold. If you want to have something show in italic, use a font that is italic.

    Older software used dirty tricks to create "bold-alike" text, but the good (and easy) way to do it is to make sure you select the correct font before you start drawing text.

    0 讨论(0)
提交回复
热议问题