pdfinfo
Description
Examples
Extract Information from PDF File
Extract the PDF information from the file exampleSonnets.pdf
.
filename = "exampleSonnets.pdf";
info = pdfinfo(filename)
info = struct with fields:
NumPages: 47
PageSize: [47×4 double]
PDFVersion: "1.6"
Title: ""
Subject: ""
Language: "en-GB"
Keywords: ""
Author: "William Shakespeare"
Creator: "Microsoft® Word 2013"
Producer: "Microsoft® Word 2013"
CreationDate: 21-Jul-2017 11:53:33
ModificationDate: 28-Sep-2022 17:30:37
Encrypted: 0
AllowsTextExtraction: 1
Filename: "C:\TEMP\exampleSonnets.pdf"
Input Arguments
filename
— Name of file
string scalar | character vector | 1-by-1 cell array containing a character vector
Name of the file, specified as a string scalar, character vector, or a 1-by-1 cell array containing a character vector.
Data Types: string
| char
| cell
password
— Password to open PDF file
string scalar | character vector
Password to open the PDF file, specified as a character vector or a string scalar.
Example: "skroWhtaM"
Data Types: string
| char
Output Arguments
info
— PDF file information
structure
PDF file information, returned as a structure with these fields:
NumPages
— Number of pagesPageSize
— Size of the pages, specified as aNumPages
-by-4
array.PageSize(n,:)
is the vector[left bottom width height]
that corresponds to pagen
, where:left
is the distance of the left edge of the canvas to the left edge of the page in PDF points (1/72 inch)bottom
is the distance of the bottom edge of the canvas to the bottom edge of the page in PDF pointsheight
is the height of the page in PDF pointswidth
is the width of the page in PDF points
PDFVersion
— Version of PDF fileTitle
— Title stored in PDF file metadataLanguage
— Language stored in PDF file metadataKeywords
— Keywords of PDF fileAuthor
— Author of PDF fileCreator
— Creator of PDF fileProducer
— Producer of PDF fileCreationDate
— Date and time when PDF file was createdModificationDate
— Date and time when PDF file was last modifiedEncrypted
— Flag indicating whether PDF file is encryptedAllowsTextExtraction
— Flag indicating whether PDF file allows text extractionFilename
— Filename of PDF file
Version History
Introduced in R2023a
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)