如何在PDF中加粗文本? [英] How to bold a text in PDF?

查看:183
本文介绍了如何在PDF中加粗文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的程序开发一个新功能。这个功能可以通过简单的方式编写PDF文件,制作一些简单的文本文件,其中包含一些PDF标准的代码。

我试图理解它是如何工作的,但我的第一个问题是如何在我的文档的某一行上应用粗体。



我已经下载了PDF REFERENCES GUIDE,但是我没有找到任何东西关于它。



任何想法? 正如你在PDF参考文献中所看到的那样,你在PDF中所做的一切就是设置一个图形环境(使用的颜色,使用的字体等),然后在页面上放置文本。



如果您想要以粗体显示某些内容,请使用粗体字体。如果你想用斜体显示,使用斜体字体。



以前的软件使用肮脏的技巧来创建大胆的文本,但好和简单)的方法是确保你选择正确的字体,然后再开始绘制文本。


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.

I'm trying to understand how it works yet, but my first problem is about how to apply bold on some line of my document.

I've already downloaded the PDF REFERENCES GUIDE, but I've not found nothing about it.

Any idea?

解决方案

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.

这篇关于如何在PDF中加粗文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆