您可以尝试将 PDF 中的文本复制/粘贴到其他文档中并替换字体,甚至使用一些 PDF 编辑工具 (enfocus PitStop 是最受欢迎的字体之一;它很便宜但不是免费的),可以用另一种更完整的字体替换该字体。
As stema said, this has nothing to do with regular expressions.
Neither is it about some "pdf escape sequences", as PDF uses binary safe text encodings.
These square blocks are usually shown in place of some characters that doesn't have a representation in the chosen font. Often, it happens that the typesetting software replaces some quotes or other characters with a 'nicer' Unicode alternative; but the font doesn't have those characters.
You could try to copy/paste the text from the PDF into some other document and replace the font, or even use some PDF editing tools (enfocus PitStop is one of the most popular; it's cheap but not free) to replace the font with another more complete.
我认为这里的问题是一些正则表达式快捷方式在 pdf 创建过程中被解释为转义序列,因此不会按字面打印。
你没有写下你如何创建你的pdf,但我认为当你转义反斜杠时,当你想按字面打印它们时,就可以了。
因此,当您想在 pdf 中查看 \s 时,请在源格式中输入 \\s。 (如果您想在某处打印转义反斜杠,例如 \\ ,则编写 \\\\)。
At first, this has nothing to do with regex, except that the document you are writing is about regular expressions.
I assume, the sequence that is replaced by a square is \s, isn't it?
I think the problem here is that some regular expression shortcuts are interpreted as escape sequences in the pdf creation process and therefor not printed literally.
You don't write how you create your pdf, but I would assume that will be OK when you escape the backslashes, when you want to print them literally.
So when you want to see a \s in the pdf, type \\s in your source format. (If you have somewhere a escaped backslash you want to print like \\ then write \\\\).
背景信息: 如果您未启用使用本地字体,则您要求阅读器仅使用 PDF 嵌入字体来显示所有文本。如果嵌入了字体,但缺少一些所需的字形,启用所述设置可能在您的系统上找到所需的字体来呈现文本,或者阅读器可以使用其内置的Multiple Master 字体或多或少会尝试伪造原始字形的外观......
Javier's answer is nearly complete. But let me add this:
You'll have a small chance to get Acrobat Reader display the square boxes using a "substitute" font by toggling a certain setting in its application preferences.
IIRC, the setting is called 'Use local fonts'. You can usually find it in the Page display section of the preferences settings, but over the different releases Adobe kept adding, removing or re-locating different settings...
Background info: If you have NOT enabled Use local fonts, then you require the Reader to only use the PDF-embedded fonts for displaying all text. In case the font is embedded, but misses some required glyphs, enabling said setting may find the required font on your system to render the text, or the Reader may use its built-in Multiple Master fonts which will try to fake the look of the original glyph, more or less....
发布评论
评论(4)
正如 stema 所说,这与正则表达式。
它也不是关于某些“pdf 转义序列”,因为 PDF 使用二进制安全文本编码。
这些方块通常用来代替某些在所选字体中没有表示的字符。通常,排版软件会用“更好的”Unicode 替代品替换一些引号或其他字符;但字体没有这些字符。
您可以尝试将 PDF 中的文本复制/粘贴到其他文档中并替换字体,甚至使用一些 PDF 编辑工具 (enfocus PitStop 是最受欢迎的字体之一;它很便宜但不是免费的),可以用另一种更完整的字体替换该字体。
As stema said, this has nothing to do with regular expressions.
Neither is it about some "pdf escape sequences", as PDF uses binary safe text encodings.
These square blocks are usually shown in place of some characters that doesn't have a representation in the chosen font. Often, it happens that the typesetting software replaces some quotes or other characters with a 'nicer' Unicode alternative; but the font doesn't have those characters.
You could try to copy/paste the text from the PDF into some other document and replace the font, or even use some PDF editing tools (enfocus PitStop is one of the most popular; it's cheap but not free) to replace the font with another more complete.
首先,这与正则表达式无关,只是您正在编写的文档是关于正则表达式的。
我假设,被正方形替换的序列是
\s
,不是吗?我认为这里的问题是一些正则表达式快捷方式在 pdf 创建过程中被解释为转义序列,因此不会按字面打印。
你没有写下你如何创建你的pdf,但我认为当你转义反斜杠时,当你想按字面打印它们时,就可以了。
因此,当您想在 pdf 中查看
\s
时,请在源格式中输入\\s
。 (如果您想在某处打印转义反斜杠,例如\\
,则编写\\\\
)。At first, this has nothing to do with regex, except that the document you are writing is about regular expressions.
I assume, the sequence that is replaced by a square is
\s
, isn't it?I think the problem here is that some regular expression shortcuts are interpreted as escape sequences in the pdf creation process and therefor not printed literally.
You don't write how you create your pdf, but I would assume that will be OK when you escape the backslashes, when you want to print them literally.
So when you want to see a
\s
in the pdf, type\\s
in your source format. (If you have somewhere a escaped backslash you want to print like\\
then write\\\\
).哈维尔的回答几乎已经完成。但让我补充一点:
通过切换应用程序首选项中的某个设置,您将有很小的机会让 Acrobat Reader 使用“替代”字体显示方框。
IIRC,该设置称为“使用本地字体”。您通常可以在首选项设置的页面显示部分找到它,但在不同的版本中,Adobe 不断添加、删除或重新定位不同的设置...
背景信息: 如果您未启用使用本地字体,则您要求阅读器仅使用 PDF 嵌入字体来显示所有文本。如果嵌入了字体,但缺少一些所需的字形,启用所述设置可能在您的系统上找到所需的字体来呈现文本,或者阅读器可以使用其内置的Multiple Master 字体或多或少会尝试伪造原始字形的外观......
Javier's answer is nearly complete. But let me add this:
You'll have a small chance to get Acrobat Reader display the square boxes using a "substitute" font by toggling a certain setting in its application preferences.
IIRC, the setting is called 'Use local fonts'. You can usually find it in the Page display section of the preferences settings, but over the different releases Adobe kept adding, removing or re-locating different settings...
Background info: If you have NOT enabled Use local fonts, then you require the Reader to only use the PDF-embedded fonts for displaying all text. In case the font is embedded, but misses some required glyphs, enabling said setting may find the required font on your system to render the text, or the Reader may use its built-in Multiple Master fonts which will try to fake the look of the original glyph, more or less....
.-瞧:完成了!
.- Voila: it is done!