SlideShare a Scribd company logo
FPDF Creating PDF files with PHP http://www.fpdf.org/   By Mike Creuzer mike.creuzer.com   For:  The West Suburban Chicago PHP Meetup Group http://suburbanchicagophp.org/
Why Create PDF files? Because your client wants one Because you need pixel-perfect positioning on printed pages Because you want to have a 'saveable' page Because you want an 'immutable' page Because some things are done easier in PDFs then HTML Because you may want a password protected document Because you want to create the impression of a document Because, Because, Because... Because of the wonderful things it does...
Why FPDF? FPDF is an existing library, used by many people. Pros: Written by somebody else - no re-inventing the wheel Tested, debugged, and hopefully working code Flexible, extensible, many different modules Many examples of different things you can do with it The price is right! Free! Cons: A bit of a learning curve to get started Infrequently updated (Could just be 'done' at this point)
What does FPDF say about itself? FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs. FPDF has other advantages: high level functions. Here is a list of its main features: Choice of measure unit, page format and margins  Page header and footer management  Automatic page break  Automatic line break and text justification  Image support (JPEG, PNG and GIF)  Colors  Links  TrueType, Type1 and encoding support  Page compression FPDF requires no extension (except zlib to activate compression and GD for GIF support) and works with PHP4 and PHP5. Source:  http://www.fpdf.org/  
A brief example from fpdf.org: <?php    require( 'fpdf.php' );    $pdf  = new  FPDF ();    $pdf -> AddPage ();       $pdf -> SetFont ( 'Arial' ,  'B' ,  16 );    $pdf -> Cell ( 40 ,  10 ,  'Hello World!' );       $pdf -> Output (); ?> Include the class library Create a new class object Add a page to the PDF document Set the font Create a 'cell' and put some text into it Output the PDF file
A few tips The $ pdf->Output();  call issues headers so the mime type is right so the browser can view the file as a .pdf. Outputting anything directly to the browser before the output call causes a HTML header to be sent at that point, breaking the PDF file.  Any output after the call gets interpreted as part of the file, corrupting the PDF file format. Watch those empty lines after the  ?> To add functionality, you extend the class. There are many examples of class extensions in the 'scripts' page. 
What I have used FPDF for in the past Auto Generated Printable Course Calendar  Created a 'Calendar' format list of classes available to students.Many people work of that format better than a list. Dynamic pre-populated Fax Cover sheet From a contact detail screen, create a pre-filled fax cover sheetExtra space on the cover sheet is upcoming calendar events Automatic Name Badges  Create Avery formated name badges Include event logo watermarked on the badgeAutoscale long names to fit width of the badge
Dynamic Name Badge PDF Creation 8 name badges ready to print! Includes watermarked event logo!
Name Badge Process I chose to use fpdf to create name badges as a PDF file is formatted for a printed page as opposed to a computer screen. Steps to create a namebadge in a PDF file: Define the size of a badge on the page & spacing between badges Create a .PDF file ready for inserting the names Add the watermarked event image Scale and add the person's name Scale and add the person's company Calculate where the next badge should be placed on the page Output the completed PDF file
Working code example: Setting Params              require( &quot;{$_SERVER['DOCUMENT_ROOT']}/lib/fpdf/fpdf.php&quot; );              $result  =  getanevent ( $location ,  $date );  // Get list of names/companies              $duplicates  =  $duplcatesdata  =  $staffdata  = array();                      $name  =  &quot;{$location}_{$date}__(&quot;  .  date ( &quot;Y-m-d&quot; ,  time ()) .  &quot;).csv&quot; ;              // Avery 5895              $topMargin  =  5 / 8 ;              $leftMargin  =  11 / 16 ;              $bottomMargin  =  1 / 2 ;              $height  =  7 / 3 ;              $width  =  27 / 8 ;              $gutter  =  3 / 8 ;              $gap  =  11 / 64 ;                              // Create the PDF class object              $pdf =new  FPDF ( 'P' ,  'in' ,  'Letter' );              $pdf -> SetTopMargin ( $topMargin );              $pdf -> SetLeftMargin ( $leftMargin );              $pdf -> SetAutoPageBreak ( TRUE ,  $bottomMargin  -  .2 );              $pdf -> AddPage ();              $pdf -> SetFont ( 'Arial' , 'B' , 10 );
Detect and skip duplicates                              $rowcounter  =  1 ;  // (actually columns) so we know how many labels we have done               foreach( $result  as  $record )  // loop through the names             {                                      // Look for duplicate names                 if(  in_array ( &quot;{$record[1]} {$record[2]}&quot; ,  $duplicates ) )                 {                      //$duplicatesdata[] = $record;                  }elseif(  strtolower ( substr ( $record [ 7 ], - 20 )) ==  'hexagonmetrology.com' )                 {  // Looking for staff and skipping                      //$staffdata[] = $record;                                               // We could also print a staff badge here                  }else{
Scaling the names/company names                                               // Print the watermark                                               $pdf -> Image ( &quot;{$_SERVER['DOCUMENT_ROOT']}/LOGO.jpg&quot; ,  $pdf -> GetX () +  .5 ,  $pdf -> GetY () +  .55 ,  $width  - 1  );                                                // Create and capitalize the name from firstname & lastname                      $content  =  ucwords ( $record [ 1 ]) .  &quot; &quot;  .  ucwords ( $record [ 2 ]) ;                      $textsize  =  28 ;  // default font size                      $pdf -> SetFont ( 'Arial' , 'B' , $textsize );                                         while(  $pdf -> GetStringWidth ( $content ) >  $width  -  .6 )                     {  // loop while the name is too big for the badge                          $textsize --;                          $pdf -> SetFont ( 'Arial' , 'B' , $textsize );                                         }                                                // Add the name to the badge                      $pdf -> Cell ( $width ,  $height / 2 ,  $content ,  '' ,  '2' ,  'C' );                                                  // Capitalize the company name                      $content  =   ucwords ( $record [ 3 ]);                      $textsize  =  18 ; // smaller default font size for the company                      $pdf -> SetFont ( 'Arial' , 'B' , $textsize );                                         while(  $pdf -> GetStringWidth ( $content ) >   $width  -  .6 )                     { // loop while the company name is too big for the badge                          $textsize --;                          $pdf -> SetFont ( 'Arial' , 'B' , $textsize );                                         }                      $pdf -> Cell ( $width ,  $height / 2 ,  $content ,  '' ,  '' ,  'C' );
Setting up for the next badge                      // Save this name for duplicate detection                                               $duplicates [] =  &quot;{$record[1]} {$record[2]}&quot; ;                     if( $rowcounter  %  2  ==  0 )  // Even columns, not rows                      {                          $pdf -> Ln ( ( $height / 2 ) +  $gap );  // start again at a new line                     }else  // odd (1st) columns                     {                          $pdf -> SetXY ( $pdf -> GetX () +  $gutter ,  $pdf -> GetY () - ( $height / 2 )  );                          //$pdf->SetY($pdf->GetY() - ((7/3)/2));                      }                     if( $rowcounter  %  8  ==  0 )  // end of page                      {                          $pdf -> AddPage ();                     }                      $rowcounter ++;  // increment the badge counter                 }             }              // Output the pdf file              $pdf -> Output ();  // could pass in $name if we wanted to save as a file             die();  // Hack to make the file download work in Joomla
FPDF class functions used FPDF  - constructor SetTopMargin  - set top margin SetLeftMargin  - set left margin SetAutoPageBreak  - set the automatic page breaking mode AddPage  - add a new page SetFont  - set font face, style, size Image  - output an image GetStringWidth  - compute string length Cell  - print a cell Ln  - line break SetXY  - set current x and y positions Output  - save or send the document
Other examples of what FPDF can do: Barcodes Calendars Charts Trees Use existing PDFs as templates Labels Javascript Support in a PDF HTML formatting CMYK & Pantone color support
Any Questions? Thank you for your time.

More Related Content

PPTX
Coaching Soccer Slideshow
PPTX
Guardiola + Chaos Theory
PDF
Siber Saldırı Aracı Olarak DDoS
PPTX
Waf bypassing Techniques
PPSX
8v8 at under 11
PPTX
Color code
PDF
Test-Driven Security
PDF
2021 final schedule
Coaching Soccer Slideshow
Guardiola + Chaos Theory
Siber Saldırı Aracı Olarak DDoS
Waf bypassing Techniques
8v8 at under 11
Color code
Test-Driven Security
2021 final schedule

What's hot (20)

PDF
Empire Kurulumu ve Kullanımı
PPTX
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 1, 2, 3
PDF
Metasploit Framework Eğitimi
PDF
Başarılı Bir Siber Saldırının Perde Arkası ve Vaka Analizi
PPTX
Attacking thru HTTP Host header
PPTX
Μεθοδολογία Εκπαίδευσης
PDF
Sql, Sql Injection ve Sqlmap Kullanımı
PDF
TACTICAL PERIODIZATION - THE SECRETS OF SOCCER MOST EFFECTIVE TRAINING METHOD...
PPTX
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 16, 17, 18
PDF
Goalkeeper Coaching
PDF
Siber Saldırılar i̇çin Erken Uyarı Sistemi
PDF
LLMNR ve NetBIOS Poisoning
PPTX
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 19
PDF
Açık Kaynak Kodlu Çözümler Kullanarak SOC Yönetimi SOAR & IRM Webinar - 2020
PDF
Zararlı Yazılım Analizi Eğitimi Lab Kitabı
PPTX
Reverse proxies & Inconsistency
PDF
İleri Seviye Ağ Güvenliği Lab Kitabı
PDF
DOS, DDOS Atakları ve Korunma Yöntemleri
PDF
Yeni Nesil DDOS Saldırıları ve Korunma Yöntemleri
PPTX
Mod security
Empire Kurulumu ve Kullanımı
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 1, 2, 3
Metasploit Framework Eğitimi
Başarılı Bir Siber Saldırının Perde Arkası ve Vaka Analizi
Attacking thru HTTP Host header
Μεθοδολογία Εκπαίδευσης
Sql, Sql Injection ve Sqlmap Kullanımı
TACTICAL PERIODIZATION - THE SECRETS OF SOCCER MOST EFFECTIVE TRAINING METHOD...
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 16, 17, 18
Goalkeeper Coaching
Siber Saldırılar i̇çin Erken Uyarı Sistemi
LLMNR ve NetBIOS Poisoning
Beyaz Şapkalı Hacker CEH Eğitimi - Bölüm 19
Açık Kaynak Kodlu Çözümler Kullanarak SOC Yönetimi SOAR & IRM Webinar - 2020
Zararlı Yazılım Analizi Eğitimi Lab Kitabı
Reverse proxies & Inconsistency
İleri Seviye Ağ Güvenliği Lab Kitabı
DOS, DDOS Atakları ve Korunma Yöntemleri
Yeni Nesil DDOS Saldırıları ve Korunma Yöntemleri
Mod security
Ad

Viewers also liked (20)

KEY
HTML5 History & Features
PPT
Introduction to FPDF
PPTX
Pdf's in PHP
PPT
PHP - Introduction to PHP Fundamentals
PPT
Reporting using FPDF
DOC
A Happy Day
PDF
Economia cyberpunk
PDF
Kollmorgen servostar600 with_gold_line_bhmh_tb_catalog
PDF
Ponencias de la jornada técnica “Proyectos europeos en eficiencia energética ...
PPT
Research Methods Workshop, Discourse Analysis
PPS
Casi 1 AñO Sofi
PDF
Pedrezuela, ofertas de empleo 10 de enero de 2012
PDF
Dnit108 2009 es
DOCX
Navegadores de internet deber 1
DOCX
Resumen capitulo 11 boylestad
PDF
Memoria de actividades TF Innova 2008-2014
PPTX
File Uploading in PHP
PPTX
Ejemplo de aplicación Android "Hola mundo", Botones, Intents
PPTX
Vincent van gogh kinder
PPTX
Uploading a file with php
HTML5 History & Features
Introduction to FPDF
Pdf's in PHP
PHP - Introduction to PHP Fundamentals
Reporting using FPDF
A Happy Day
Economia cyberpunk
Kollmorgen servostar600 with_gold_line_bhmh_tb_catalog
Ponencias de la jornada técnica “Proyectos europeos en eficiencia energética ...
Research Methods Workshop, Discourse Analysis
Casi 1 AñO Sofi
Pedrezuela, ofertas de empleo 10 de enero de 2012
Dnit108 2009 es
Navegadores de internet deber 1
Resumen capitulo 11 boylestad
Memoria de actividades TF Innova 2008-2014
File Uploading in PHP
Ejemplo de aplicación Android "Hola mundo", Botones, Intents
Vincent van gogh kinder
Uploading a file with php
Ad

More from Dave Ross (20)

KEY
Stylesheets of the future with Sass and Compass
PPT
A geek's guide to getting hired
KEY
NoSQL & MongoDB
PDF
Date and Time programming in PHP & Javascript
KEY
Simulated Eye Tracking with Attention Wizard
KEY
What's new in HTML5?
KEY
The Canvas Tag
KEY
Wordpress
PPT
Lamp Stack Optimization
PPT
FirePHP
PPT
Bayesian Inference using b8
PPT
SQL Injection in PHP
KEY
Web App Security: XSS and CSRF
KEY
The Mobile Web: A developer's perspective
KEY
Balsamiq Mockups
KEY
LAMP Optimization
KEY
Lint - PHP & Javascript Code Checking
KEY
Cufon - Javascript Font Replacement
KEY
PHP Output Buffering
KEY
Firebug
Stylesheets of the future with Sass and Compass
A geek's guide to getting hired
NoSQL & MongoDB
Date and Time programming in PHP & Javascript
Simulated Eye Tracking with Attention Wizard
What's new in HTML5?
The Canvas Tag
Wordpress
Lamp Stack Optimization
FirePHP
Bayesian Inference using b8
SQL Injection in PHP
Web App Security: XSS and CSRF
The Mobile Web: A developer's perspective
Balsamiq Mockups
LAMP Optimization
Lint - PHP & Javascript Code Checking
Cufon - Javascript Font Replacement
PHP Output Buffering
Firebug

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Approach and Philosophy of On baking technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Encapsulation theory and applications.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Programs and apps: productivity, graphics, security and other tools
Dropbox Q2 2025 Financial Results & Investor Presentation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Encapsulation theory and applications.pdf
The AUB Centre for AI in Media Proposal.docx
Reach Out and Touch Someone: Haptics and Empathic Computing
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

The FPDF Library

  • 1. FPDF Creating PDF files with PHP http://www.fpdf.org/   By Mike Creuzer mike.creuzer.com   For:  The West Suburban Chicago PHP Meetup Group http://suburbanchicagophp.org/
  • 2. Why Create PDF files? Because your client wants one Because you need pixel-perfect positioning on printed pages Because you want to have a 'saveable' page Because you want an 'immutable' page Because some things are done easier in PDFs then HTML Because you may want a password protected document Because you want to create the impression of a document Because, Because, Because... Because of the wonderful things it does...
  • 3. Why FPDF? FPDF is an existing library, used by many people. Pros: Written by somebody else - no re-inventing the wheel Tested, debugged, and hopefully working code Flexible, extensible, many different modules Many examples of different things you can do with it The price is right! Free! Cons: A bit of a learning curve to get started Infrequently updated (Could just be 'done' at this point)
  • 4. What does FPDF say about itself? FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs. FPDF has other advantages: high level functions. Here is a list of its main features: Choice of measure unit, page format and margins Page header and footer management Automatic page break Automatic line break and text justification Image support (JPEG, PNG and GIF) Colors Links TrueType, Type1 and encoding support Page compression FPDF requires no extension (except zlib to activate compression and GD for GIF support) and works with PHP4 and PHP5. Source:  http://www.fpdf.org/  
  • 5. A brief example from fpdf.org: <?php    require( 'fpdf.php' );    $pdf  = new  FPDF ();    $pdf -> AddPage ();       $pdf -> SetFont ( 'Arial' ,  'B' ,  16 );    $pdf -> Cell ( 40 ,  10 ,  'Hello World!' );       $pdf -> Output (); ?> Include the class library Create a new class object Add a page to the PDF document Set the font Create a 'cell' and put some text into it Output the PDF file
  • 6. A few tips The $ pdf->Output(); call issues headers so the mime type is right so the browser can view the file as a .pdf. Outputting anything directly to the browser before the output call causes a HTML header to be sent at that point, breaking the PDF file.  Any output after the call gets interpreted as part of the file, corrupting the PDF file format. Watch those empty lines after the ?> To add functionality, you extend the class. There are many examples of class extensions in the 'scripts' page. 
  • 7. What I have used FPDF for in the past Auto Generated Printable Course Calendar  Created a 'Calendar' format list of classes available to students.Many people work of that format better than a list. Dynamic pre-populated Fax Cover sheet From a contact detail screen, create a pre-filled fax cover sheetExtra space on the cover sheet is upcoming calendar events Automatic Name Badges  Create Avery formated name badges Include event logo watermarked on the badgeAutoscale long names to fit width of the badge
  • 8. Dynamic Name Badge PDF Creation 8 name badges ready to print! Includes watermarked event logo!
  • 9. Name Badge Process I chose to use fpdf to create name badges as a PDF file is formatted for a printed page as opposed to a computer screen. Steps to create a namebadge in a PDF file: Define the size of a badge on the page & spacing between badges Create a .PDF file ready for inserting the names Add the watermarked event image Scale and add the person's name Scale and add the person's company Calculate where the next badge should be placed on the page Output the completed PDF file
  • 10. Working code example: Setting Params              require( &quot;{$_SERVER['DOCUMENT_ROOT']}/lib/fpdf/fpdf.php&quot; );              $result  =  getanevent ( $location ,  $date );  // Get list of names/companies              $duplicates  =  $duplcatesdata  =  $staffdata  = array();                      $name  =  &quot;{$location}_{$date}__(&quot;  .  date ( &quot;Y-m-d&quot; ,  time ()) .  &quot;).csv&quot; ;              // Avery 5895              $topMargin  =  5 / 8 ;              $leftMargin  =  11 / 16 ;              $bottomMargin  =  1 / 2 ;              $height  =  7 / 3 ;              $width  =  27 / 8 ;              $gutter  =  3 / 8 ;              $gap  =  11 / 64 ;                              // Create the PDF class object              $pdf =new  FPDF ( 'P' ,  'in' ,  'Letter' );              $pdf -> SetTopMargin ( $topMargin );              $pdf -> SetLeftMargin ( $leftMargin );              $pdf -> SetAutoPageBreak ( TRUE ,  $bottomMargin  -  .2 );              $pdf -> AddPage ();              $pdf -> SetFont ( 'Arial' , 'B' , 10 );
  • 11. Detect and skip duplicates                              $rowcounter  =  1 ;  // (actually columns) so we know how many labels we have done              foreach( $result  as  $record )  // loop through the names             {                                      // Look for duplicate names                 if(  in_array ( &quot;{$record[1]} {$record[2]}&quot; ,  $duplicates ) )                 {                      //$duplicatesdata[] = $record;                  }elseif(  strtolower ( substr ( $record [ 7 ], - 20 )) ==  'hexagonmetrology.com' )                 {  // Looking for staff and skipping                      //$staffdata[] = $record;                                               // We could also print a staff badge here                  }else{
  • 12. Scaling the names/company names                                               // Print the watermark                                               $pdf -> Image ( &quot;{$_SERVER['DOCUMENT_ROOT']}/LOGO.jpg&quot; ,  $pdf -> GetX () +  .5 ,  $pdf -> GetY () +  .55 ,  $width  - 1  );                                                // Create and capitalize the name from firstname & lastname                      $content  =  ucwords ( $record [ 1 ]) .  &quot; &quot;  .  ucwords ( $record [ 2 ]) ;                      $textsize  =  28 ;  // default font size                      $pdf -> SetFont ( 'Arial' , 'B' , $textsize );                                         while(  $pdf -> GetStringWidth ( $content ) >  $width  -  .6 )                     {  // loop while the name is too big for the badge                          $textsize --;                          $pdf -> SetFont ( 'Arial' , 'B' , $textsize );                                         }                                                // Add the name to the badge                      $pdf -> Cell ( $width ,  $height / 2 ,  $content ,  '' ,  '2' ,  'C' );                                                  // Capitalize the company name                      $content  =   ucwords ( $record [ 3 ]);                      $textsize  =  18 ; // smaller default font size for the company                      $pdf -> SetFont ( 'Arial' , 'B' , $textsize );                                         while(  $pdf -> GetStringWidth ( $content ) >   $width  -  .6 )                     { // loop while the company name is too big for the badge                          $textsize --;                          $pdf -> SetFont ( 'Arial' , 'B' , $textsize );                                         }                      $pdf -> Cell ( $width ,  $height / 2 ,  $content ,  '' ,  '' ,  'C' );
  • 13. Setting up for the next badge                      // Save this name for duplicate detection                                               $duplicates [] =  &quot;{$record[1]} {$record[2]}&quot; ;                     if( $rowcounter  %  2  ==  0 )  // Even columns, not rows                      {                          $pdf -> Ln ( ( $height / 2 ) +  $gap );  // start again at a new line                     }else  // odd (1st) columns                     {                          $pdf -> SetXY ( $pdf -> GetX () +  $gutter ,  $pdf -> GetY () - ( $height / 2 )  );                          //$pdf->SetY($pdf->GetY() - ((7/3)/2));                      }                     if( $rowcounter  %  8  ==  0 )  // end of page                      {                          $pdf -> AddPage ();                     }                      $rowcounter ++;  // increment the badge counter                 }             }              // Output the pdf file              $pdf -> Output ();  // could pass in $name if we wanted to save as a file             die();  // Hack to make the file download work in Joomla
  • 14. FPDF class functions used FPDF - constructor SetTopMargin - set top margin SetLeftMargin - set left margin SetAutoPageBreak - set the automatic page breaking mode AddPage - add a new page SetFont - set font face, style, size Image - output an image GetStringWidth - compute string length Cell - print a cell Ln - line break SetXY - set current x and y positions Output - save or send the document
  • 15. Other examples of what FPDF can do: Barcodes Calendars Charts Trees Use existing PDFs as templates Labels Javascript Support in a PDF HTML formatting CMYK & Pantone color support
  • 16. Any Questions? Thank you for your time.