huynhan147/pdf_exif

There is no license information available for the latest version (1.0) of this package.

Package for extracting information from PDF file

1.0 2018-05-21 06:40 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:42:01 UTC


README

Gói này sử dụng thư viện PDFLib để tương tác và trích xuất dữ liệu từ file pdf.

Lưu ý Gói này chỉ giới hạn cho các file pdf nhỏ với tối đa 10 pages và 1 MB.

Yêu cầu

Hệ thống của bạn cần cài đặt PDFLib 9. Có thể cài đặt theo hướng dẫn tại đây

Cài đặt

Cài đặt package qua Composer

composer require huynhan147/pdf_exif

Sử dụng

Khởi tạo một đối tượng, truyền vào đường dẫn đến file pdf $path:

$read = new ReadPDF($path);

Có 2 kiểu lấy dữ liệu.

  • Lấy một array chứa toàn bộ thông tin
$data = $read->getAllInfo();
  • Lấy từng thông tin (Title, Author, Creator...)
$title = $read->getInfoByKey('Title');
$author = $read->getInfoByKey('Author');