2017 © Pedro Peláez
 

library phptopdf

laravel 4.2 package to converting html or php to pdf, this package also have the ability to get the url and return pdf which was generated from specified url .this is an online service so you need internet access to use this package

image

majid/phptopdf

laravel 4.2 package to converting html or php to pdf, this package also have the ability to get the url and return pdf which was generated from specified url .this is an online service so you need internet access to use this package

  • Sunday, November 23, 2014
  • by majidphpdeveloper
  • Repository
  • 2 Watchers
  • 6 Stars
  • 91 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

PDF maker Package for Laravel 4.2

Installation

Add this package to your composer.json and run composer update. "Majid/phptopdf": "dev-master", (*1)

Add the ServiceProvider to the providers array in, (*2)

 app/config/app.php

```php 'Majid\Phptopdf\PhptopdfServiceProvider', (*3)


then go to [phptopdf sign up page](https://phptopdf.com/signup/) and sign up , it's free. then get API_KEY from site and just copy and paste it in line 5 of file mentiond below. ```php your_project_path/vendor/phptopdf/src/Majid/Phptopdf/phptopdf.php
$my_html = '<HTML>';
$my_html .= "<link rel=\"stylesheet\" href=\"http://phptopdf.com/bootstrap.css\">";


$my_html .= "

<

div>".
$my_html .= "what ever html element and php function which has html element output you can use here like below"
$my_html .= "

" $math_var = (2+3) * 7; $my_html .= " < div>". $my_html .= $math_var; $my_html .= "
" $my_html .= '</HTML>'; $pdf_options = array( "encoding" => 'UTF-8', "source_type" => 'html', "source" => $my_html, "action" => 'save', "save_directory" => app_path().'/../public/files/pdf', "file_name" => 'factor.pdf' ); Phptopdf::phptopdf($pdf_options);

As you can see phptopdf function is a function which is available in phptopdf library and I just gathered all of its function under my class and you can use all of its functions as below :, (*4)

Phptopdf::phptopdf
Phptopdf::phptopdf_url
Phptopdf::phptopdf_html

see phptopdf.com for functions arguments and right syntax., (*5)

Phptopdf::phptopdf($pdf_options);

and finally you can read phptopdf official web site for more documentation., (*6)

License

this package was created by Majid Abdolhosseini and is released under the MIT License., (*7)

The Versions

23/11 2014

dev-master

9999999-dev

laravel 4.2 package to converting html or php to pdf, this package also have the ability to get the url and return pdf which was generated from specified url .this is an online service so you need internet access to use this package

  Sources   Download

MIT

The Requires

 

by Majid Hosseini

laravel pdf htmltopdf laravel4.2 phptopdf imagetopdf urltopdf