Comments (1)
Hi, this is how you should do it: assuming that fpdf.php, easyTable.php, exfpdf.php, fpdi.php and any other files from this libraries are in the same directory. So the class exfpdf should extends fpdi:
In exfpdf.php:
`<?php
// include 'fpdf.php'; <-- no needed here
include 'fpdi.php';
class exFPDF extends FPDI
{
etc
etc
`
and in your project:
`<?php
include 'fpdf.php';
//include 'fpdi.php'; no needed because exfpdf is extending fpdi class
include 'exfpdf.php';
include 'easyTable.php';
//$pdf = new FPDI(); remember exfpdf is extending the fpdi class
$pdf=new exFPDF(); // so we initiate exFPDF instead of FPDI
// add a page
$pdf->AddPage();
// set the source file
$pdf->setSourceFile("example-2.pdf");
// import page 1
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 10, 10, 100);
//add another page
$pdf->AddPage();
$pdf->SetFont('helvetica','',10);
$table1=new easyTable($pdf, 2);
$table1->easyCell('Sales Invoice', 'font-size:30; font-style:B; font-color:#00bfff;');
$table1->easyCell('', 'img:fpdf.png, w80; align:R;');
$table1->printRow();
//etc
//etc
`
from fpdf-easytable.
Related Issues (20)
- HTML convertion and space between paragraphs HOT 1
- easyCell and AddFont HOT 4
- table header do not repeat HOT 4
- valign dont work HOT 1
- Wrong page size and orientation at page break HOT 2
- Does not handle units other than mm HOT 1
- Bottom border doesn't appear on split-row HOT 4
- printRow(true) - table header printed twice on one page. HOT 1
- split-row: true duplicated image HOT 2
- split-row: true with printRow setAsHeader also true HOT 1
- table overlaps footer HOT 1
- support of html tags HOT 1
- image is cut on next page when cant fit HOT 1
- image is cut on next page when cant fit HOT 1
- Word-wrapping extend width of table HOT 1
- tFPDF support HOT 3
- $current_font is deprecated in exfpdf.php HOT 5
- Laravel usage HOT 2
- PageBreak not trigger HOT 1
- Text Decoration Style
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fpdf-easytable.