Skip to content
ComPDF
Guides

Document Information

Document Information

tsx
const info  = await pdfReaderRef.current?._pdfDocument.getInfo();
const title = info?.title;
const author = info?.author;
const subject = info?.subject;
const keywords = info?.keywords;
const creator = info?.creator;
const producer = info?.producer;
const creationDate = info?.creationDate;
const modDate = info?.modificationDate;

Permission Information

tsx
const permissions = await pdfReaderRef.current?._pdfDocument.getPermissionsInfo();

Page Information

tsx
// Get the size of a specific page
const pageSize = await pdfReaderRef.current?._pdfDocument.getPageSize(0);