Download the PHP package bryank-ac/pdftohtml-php without Composer
On this page you can find all versions of the php package bryank-ac/pdftohtml-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bryank-ac/pdftohtml-php
More information about bryank-ac/pdftohtml-php
Files in bryank-ac/pdftohtml-php
Package pdftohtml-php
Short Description PDF to HTML converter with PHP using Poppler-utils
License MIT
Informations about the package pdftohtml-php
A simple class for converting PDF files into HTML documents. This package was forked from the original maintainer. As it has since been abandoned, I've decided to migrate the package and port it so that it can be used in php 7.2+ environments.
Inspiration from garrensweet
PDF to HTML PHP Class
This class brought to you so you can use php and poppler-utils convert your pdf files to html file
Important Notes
Please see how to use below, since it's really upgraded and things in this package has already changed.
Installation
When you are in your active directory apps, you can just run this command to add this package on your app
Or add this package to your composer.json
Requirements
- Poppler-Utils
- Ubuntu Distro, just install it from apt
sudo apt-get install poppler-utils
- MacOS, use brew, see OSX notes section below
brew install poppler
- Ubuntu Distro, just install it from apt
- PHP Configuration with shell access enabled
Usage
Here is an example.
Passing options to getDOM
By default getDom()
extracts all images and creates a html file per page. You can pass options when extracting html:
Available Options
- singlePage, default: false
- imageJpeg, default: false
- ignoreImages, default: false
- zoom, default: 1.5
- noFrames, default: true
Usage note for Windows Users
For those who need this package in windows, there is a way. First download poppler-utils for windows here http://blog.alivate.com.au/poppler-windows/. And download the latest binary.
After download it, extract it. There will be a directory called bin
. We will need this one. Then change your code like this
Usage note for OS/X Users
Thanks to @kaleidoscopique for giving a try and make it run on OS/X for this package
1. Install brew
Brew is a famous package manager on OS/X : http://brew.sh/ (aptitude style).
2. Install poppler
3. Verify the path of pdfinfo and pdftohtml
4. Whatever the paths are, use to set them in your php code. Obviously, use the same path as the one given by the command;
Feedback & Contribute
Send me an issue for improvement or any buggy thing. I love to help and solve another people problems. Thanks :+1:
All versions of pdftohtml-php with dependencies
thesoftwarefanatics/php-html-parser Version ^1.8.1
illuminate/config Version 5.6.*|5.7.*|5.8.*
symfony/process Version ^4.2
illuminate/filesystem Version 5.6.*|5.7.*|5.8.*