[英]How to find the title for a PDF from the metadata?
How can I get the title for a PDF
file after having renamed the file itself?重命名文件本身后,如何获取
PDF
文件的标题?
PSPath : Microsoft.PowerShell.Core\FileSystem::/home/nicholas/to/99.pdf
PSParentPath : Microsoft.PowerShell.Core\FileSystem::/home/nicholas/to
PSChildName : 99.pdf
PSDrive : /
PSProvider : Microsoft.PowerShell.Core\FileSystem
PSIsContainer : False
Mode : -----
ModeWithoutHardLink : -----
VersionInfo : File: /home/nicholas/to/99.pdf
InternalName:
OriginalFilename:
FileVersion:
FileDescription:
Product:
ProductVersion:
Debug: False
Patched: False
PreRelease: False
PrivateBuild: False
SpecialBuild: False
Language:
BaseName : 99
Target :
LinkType :
Length : 592483
DirectoryName : /home/nicholas/to
Directory : /home/nicholas/to
IsReadOnly : False
FullName : /home/nicholas/to/99.pdf
Extension : .pdf
Name : 99.pdf
Exists : True
CreationTime : 2/19/2021 11:45:18 PM
CreationTimeUtc : 2/20/2021 7:45:18 AM
LastAccessTime : 2/20/2021 2:02:36 AM
LastAccessTimeUtc : 2/20/2021 10:02:36 AM
LastWriteTime : 2/19/2021 11:45:18 PM
LastWriteTimeUtc : 2/20/2021 7:45:18 AM
Attributes : Normal
PS /home/nicholas/to>
PS /home/nicholas/to> Get-ChildItem -Path ./ –File | Select-Object -Property *
This is to bulk import PDF
files into calibre
, which, notably, seems to recognize duplicates and even displays some titles.这是将
PDF
文件批量导入到calibre
中,尤其是它似乎可以识别重复项,甚至显示一些标题。 Is it parsing the PDF
file itself, or gleaning this from meta -data?它是在解析
PDF
文件本身,还是从元数据中收集?
For this, you can use pdfinfo.exe
which you can find as part of the free Xpdf command line tools .为此,您可以使用
pdfinfo.exe
,您可以在免费的Xpdf 命令行工具中找到它。
After you have downloaded and extracted the zip file, copy pdfinfo.exe
to some directory and make sure you unblock it, either by right-click or by using PowerShell下载并解压 zip 文件后,将
pdfinfo.exe
复制到某个目录并确保通过右键单击或使用 PowerShell 取消阻止它
Unblock-File -Path 'Where\Ever\You\Have\Copied\It\To\pdfinfo.exe'
Using that, to get the original title as stored in the pdf, you do使用它,要获得存储在 pdf 中的原始标题,您可以
$title = ((& 'D:\Test\pdfinfo.exe' 'D:\Test\test.pdf' |
Where-Object { $_ -match '^Title:' }) -split ':', 2)[-1].Trim()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.