Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
description of settings
  • Loading branch information
cmg_anton_nikolaev committed Sep 17, 2015
1 parent f5d2f71 commit e5c1431
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Please see how to use below.
When you are in your active directory apps, you can just run this command to add this package on your app

```
composer require tonchik-tm/pdf-to-html:~1
composer require tonchik-tm/pdf-to-html:~1
```

Or add this package to your `composer.json`

```json
{
"tonchik-tm/pdf-to-html":"~1"
"tonchik-tm/pdf-to-html":"~1"
}
```

Expand All @@ -45,7 +45,7 @@ For those who need this package in windows, there is a way. First download poppl

After download it, extract it.

### 2. We need to know where is utility
### 2. We need to know where is utilities

**Debian/Ubuntu**
```bash
Expand Down Expand Up @@ -73,7 +73,7 @@ Go in extracted directory. There will be a directory called `bin`. We will need

## Usage

Example:
**Example:**

```php
<?php
Expand Down Expand Up @@ -107,6 +107,35 @@ foreach ($pdf->getHtml()->getAllPages() as $page) {
}
```

**Full list settings:**

```php
<?php

$full_settings = [
'pdftohtml_path' => '/usr/bin/pdftohtml', // path to pdftohtml
'pdfinfo_path' => '/usr/bin/pdfinfo', // path to pdfinfo

'generate' => [ // settings for generating html
'singlePage' => false, // we want separate pages
'imageJpeg' => false, // we want png image
'ignoreImages' => false, // we need images
'zoom' => 1.5, // scale pdf
'noFrames' => false, // we want separate pages
],

'clearAfter' => true, // auto clear output dir (if removeOutputDir==false then output dir will remain)
'removeOutputDir' => true, // remove output dir
'outputDir' => '/tmp/'.uniqid(), // output dir

'html' => [ // settings for processing html
'inlineCss' => true, // replaces css classes to inline css rules
'inlineImages' => true, // looks for images in html and replaces the src attribute to base64 hash
'onlyContent' => true, // takes from html body content only
]
]
```

## Feedback & Contribute

Send me an issue for improvement or any buggy thing. I love to help and solve another people problems. Thanks :+1:

0 comments on commit e5c1431

Please sign in to comment.