關於 PDF 中不可見的頁面

關於 PDF 中不可見的頁面

是否可以建立一個新頁面,使其在 PDF 上不可見,但可以使用查找功能進行搜尋?

對於前;您將關鍵字添加到簡歷中,這些關鍵字在簡歷本身上不可見,但在簡歷資料庫中搜尋時可以找到

答案1

這個問題我們確定 pdf 影像的隱藏部分已完整儲存。進一步的實驗表明,您可以在這些隱藏部分中搜尋文本,至少如果它們靠近可見部分的話。

下面建立一個包含關鍵字的 pdf 圖像。

\documentclass{standalone}
\begin{document}
\begin{tabular}[b]{@{\hspace{10pt}}l@{}}% leave left 10pt blank
  first\\
  second\\
  third
\end{tabular}
\end{document}

在本文檔中,僅可見空白部分。如果我搜尋(使用 Acrobat),它會突出顯示關鍵字(如果它可見)所在的位置。

\documentclass{article}
\usepackage{showframe}
\usepackage{graphicx}
\begin{document}
\sbox0{\includegraphics{keywords.pdf}}% determine height
\raisebox{-\ht0}[0pt][0pt]{\rlap{\includegraphics[clip,viewport=0 0 10pt \ht0]{keywords.pdf}}}%
This is all that is visible.
\end{document}

相關內容