GithubHelp home page GithubHelp logo

samirabboud / pdfanony Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arabnewscms/pdfanony

0.0 1.0 0.0 8 KB

A PDF Package Support Arabic Based On TCPDF Developed By PhpAnonymous ( phpanonymous.com )

License: MIT License

PHP 100.00%

pdfanony's Introduction

PDF Anony Package

A PDF Package Support Arabic Based On TCPDF Developed By PhpAnonymous ( phpanonymous.com ) Laravel Version 5 and Above ##Install with Composer

composer require pdfanonymous/phpanonymous:dev-master

Provider Class

put on your config/app.php in provider array this class

 PDFAnony\TCPDF\AnonyServiceProvider::class,
 

#Aliases add this on aliases array

'PDF' =>  PDFAnony\TCPDF\Facades\AnonyPDF::class,

#publish with composer run this command php artisan vendor:publish

#usage

you can use The PDF Class anywhere you want it , in Controller or Blade File

Just Call Class PDF::HTML($yourArraySettings);

Like That

$html = view('youblade_path',['dataloop'=>$yourdataloop])->render(); // file render
// or pure html 
$html = '<h1>مرحبا بكم فى العالم </h1>';
 $pdfarr = [
		'title'=>'اهلا بكم ',
		'data'=>$html, // render file blade with content html
		'header'=>['show'=>false], // header content
		'footer'=>['show'=>false], // Footer content
		'font'=>'aealarabiya', //  dejavusans, aefurat ,aealarabiya ,times
		'font-size'=>12, // font-size 
		'text'=>'', //Write
		'rtl'=>true, //true or false 
		'creator'=>'phpanonymous', // creator file - you can remove this key
		'keywords'=>'phpanonymous keywords', // keywords file - you can remove this key
		'subject'=>'phpanonymous subject', // subject file - you can remove this key
		'filename'=>'phpanonymous.pdf', // filename example - invoice.pdf
		'display'=>'print', // stream , download , print
	];

   	PDF::HTML($pdfarr);

you can set state display if want stream or download or auto print file pdf and you can set file name and other setting

1 - rtl can be disable it or enable

2 - can render file blade with data key or put html code i'ts easy

3 - you have 4 fonts type dejavusans, aefurat ,aealarabiya ,times | default is aealarabiya just change if you want :)

4 - you can set font size the default value is 12

5 - text key you can remove it or null any way

6 - you can set information file creator or keywords or subject

7 - finally you can set your title file :) i'ts more setting coming soon

this package based on tcpdf library (https://tcpdf.org)

this package supported arabic character 100% and supported rtl 100%

Sorry Can't Support A Twitter Bootstrap Right now But i well do it soon

if you have any questions about this package join us on group facebook (https://www.facebook.com/groups/anonymouses.developers)

Enjoy :)

pdfanony's People

Contributors

amrfayad avatar arabnewscms avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.