在 Ghostscript 9.21 之前,可以使用以下代码将注释平铺到文档中:
c:\gs\gs9.23\bin\gswin64c -dSAFER -dDOPDFMARKS -dBATCH -dNOPAUSE
-sDEVICE=pdfwrite -dCompatibilityLevel=1.3
-sFONTPATH=c:/gs/fonts;%windir%/fonts;. -sPDFPassword=
-dPDFSETTINGS=/prepress -dPassThroughJPEGImages=true
-sOutputFile=file_noPW.pdf file.pdf
Run Code Online (Sandbox Code Playgroud)
这将使注释永久保留在文件中,就像 Acrobat 的印前检查选项一样。从版本 9.21 开始,这种情况不再发生。
有没有办法扁平化注释?我用它来确保使用 Latex 导入的 pdf 具有所有注释,因为 pdflatex 和 xelatex 不导入注释。
我有以下信息作为嵌套 XML 文件,我试图将其转换为 data.frame 以进行分析和报告:
<node TEXT="Cost">
<node TEXT="Scale">
<node TEXT="1 - $0 to $100">
</node>
<node TEXT="2 - $100 to $500">
</node>
<node TEXT="3 - $500 to $1000">
</node>
<node TEXT="4 - $1000 to $5000">
</node>
<node TEXT="6 - $5000 +">
</node>
</node>
<node TEXT="Weight">
<node TEXT="1">
</node>
</node>
</node>
Run Code Online (Sandbox Code Playgroud)
我能够读取 XML 文件并提取一小部分,如下所示:
file <- '<node TEXT="Cost">
<node TEXT="Scale">
<node TEXT="1 - $0 to $100">
</node>
<node TEXT="2 - $100 to $500">
</node>
<node TEXT="3 - $500 to $1000"> …Run Code Online (Sandbox Code Playgroud)