我已經從Github安裝了diff-pdf-visually工具,并在 Visual Studio Code 中使用它。
我用python運行了 2 個 PDF 檔案:
from diff_pdf_visually import pdfdiff
pdfdiff("compareA.pdf", "compareB.pdf")
然后,我得到這個結果:
Converting each page of the PDFs to an image...
PDFs have the same number of pages. Checking each pair of converted images...
Min sig = 15.2909, significant?=True. The PDFs are different. The most different pages are: page 1 (sgf. 15.2909).
False
但是,我找不到包含視覺差異的檔案。在 Github 頁面上,提到有“臨時檔案”,其中包含每頁不同的 PNG 影像。
我如何找到具有視覺差異的檔案以便使用它?
uj5u.com熱心網友回復:
臨時檔案的消失由可選的 [--time TIME] 變數控制,因此如果設定不夠高,您可能會在查看時將其洗掉。
但是,最新的 brew 應該具有額外的可選功能,可以將檔案保存在給定位置。不確定這是否是最新版本(可能不是)。
您使用 VC 的事實表明您使用的是 Windows,并且可能的位置是 %temp% 目錄中的一個子檔案夾,因此在運行比較時請注意,您應該在呼叫時看到一個新檔案夾。
因此,它可能在類似的東西中C:\Users\your name\AppData\Local\Temp\diffpdfbzfxlraz或在運行時,一些 tmp 檔案可能在作業區中并構建為 /tmp/diffpdfhkhuea_s
您需要注意兩者,因為鏈式 poppler 和 imgmagick 構建了不同的作業集,更不用說 python 或任何 windows env 設定了。在搜索時,請參閱檔案以提高 --time 以說 600 秒。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/410364.html
標籤:
上一篇:從PDF匯出頁面子集
