更改 PDF 文档中的字体大小?

发布于 2024-10-02 19:59:29 字数 81 浏览 0 评论 0原文

我想更改 pdf 文档中非嵌入字体的大小,但无法在网络上找到 pdf 的字体规范。怎么可能呢?

注意:即使文本超出指定纸张也没关系。

I'd like to change the size of the non-embedded font in a pdf document but am not able to find pdf's font spec on the web. How could it be done?

Note: It doesn't matter if the text overflows the specified paper as a result.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

生寂 2024-10-09 19:59:29

PDF 规范 但这可能不是成为你所要求的。

更改字体资源不会更改相关字体的磅值(除非进行一些非常奇怪的更改)。

字体大小在内容流中设置。要更改字体大小而不更改页面上的其他任何内容可能非常困难。 PDF 中的有些内容是绝对定位的,有些是相对的……有点。一切都是相对的,但人们会定期保存图形状态,Do Stuff,然后将其恢复为空白。

在现有 PDF 中执行此操作将涉及一些严重的内容流解析。对于具有丰富 PDF 经验的人来说,这并非易事,而对于新手来说……不切实际

调整文本大小的目的是什么?如果我们更多地了解您的目标是什么,也许我们可以想出更现实的方案。

The PDF Spec But that might not be what you were asking for.

Changing the font resource won't change the point size of the font in question (barring some Really Strange alterations).

Font size is set in content streams. To change a font's size without altering anything else on the page can be Very Hard. Some things in PDF are positioned absolutely, some relatively... sorta. Everything is relative but folks regularly save the graphic state, Do Stuff, then restore it back to a blank slate.

Doing this in an existing PDF will involve some serious content stream parsing. It is non-trivial for someone with a great deal of PDF experience, and... impractical for a novice.

What's the purpose of resizing the text? Perhaps we can come up with something more realistic if we know more about what your goal is.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文