我有一个pdf文档,我想检查文档中是否出现了特定的文本(这些是我在生成pdf时放入的标记),但是使用这些库(tcpdfFpdi、pdftk或fdpi),我无法确定是否可能或者如何做到这一点。
$str = "{hello}";
$pdf = new TcpdfFpdi();
$pdf->setSourceFile($filePath);
$pdf->searchForText($str); // something like this which returns boolean
dd(file_get_contents($filePath))
,它返回一个很长的输出,并且似乎不包含我想要的文件,所以我认为最好使用其中一个库。