mpdf Example 5. Tables <?php

Similar documents
Row 1 This is data This is data

Row 1 This is data This is data. This is data out of p This is bold data p This is bold data out of p This is normal data after br H3 in a table

mpdf Example 6. Tables nested <?php

BOOTSTRAP AFFIX PLUGIN

TITLE - Size 16 - Bold

FOR THOSE WHO DO. Lenovo Annual Report

MKA PLC Controller OVERVIEW KEY BENEFITS KEY FEATURES

The L A TEX Template for MCM Version v6.2

Example project Functional Design. Author: Marion de Groot Version

Intermediate District 288. Brand Manual. Visual Identity Guide

New Features in mpdf v5.7

VISUAL IDENTITY STARTER KIT FOR ENSURING OUR COMMUNICATIONS ARE COHESIVE, CONSISTENT AND ENGAGING 23 OCTOBER 2008

Creating An Effective Academic Poster. ~ A Student Petersheim Workshop

Timon Hazell, LEED AP Senior BIM Engineer. Galen S. Hoeflinger, AIA BIM Technologist Manager

BRAND GUIDELINES All rights reserved.

Paper Template for INTERSPEECH 2018

Brand Guidelines MAY 2016

The Next Big Thing Prepared for Meeting C

An output routine for an illustrated book

Brand identity guidelines

Thomas F. Sturm A Tutorial for Poster Creation with Tcolorbox

Project Title. A Project Report Submitted in partial fulfillment of the degree of. Master of Computer Applications

Thomas F. Sturm A Tutorial for Poster Creation with Tcolorbox

COLORS COLOR USAGE LOGOS LOCK UPS PHOTOS ELEMENTS ASSETS POWERPOINT ENVIRONMENTAL COLLATERAL PROMO ITEMS TABLE OF CONTENTS

American Political Science Review (APSR) Submission Template ANONYMISED AUTHOR(S) Anonymised Institution(s) Word Count: 658

TITLE. Tips for Producing a Newsletter IN THIS ISSUE

Connected TV Applications for TiVo. Project Jigsaw. Design Draft. 26 Feb 2013

City of Literature Branding

Colors. F0563A Persimmon. 3A414C Cobalt. 8090A2 Slate Shale. C4CDD6 Alloy Coal. EFF3F5 Silver. EDF3F9 Horizon.

ALWAYS MOVING FORWARD MIDWAY S GRAPHIC IDENTITY STANDARDS MANUAL

The everyhook package

RHYMES WITH HAPPIER!

Pablo- Alejandro Quiñones. User Experience Portfolio

Faculty Web Pages: Editing the Template Prepared by Tamara Fudge, June 2008

cosmos a tech startup

I D E N T I TY STA N DA R D S M A N UA L Rev 10.13

VISUAL. Standards Guide

Insights. Send the right message to the right person at the right time.

BRAND IDENTITY GUIDELINE

ENDF/B-VII.1 versus ENDFB/-VII.0: What s Different?

BBN ANG 183 Typography Lecture 5A: Breaking text

[Main Submission Title] (Font: IBM Plex Sans Bold, 36 point)

Prototyping Robotic Manipulators For SPHERES

Unit 20 - Client Side Customisation of Web Pages WEEK 5 LESSON 6 DESIGNING A WEB-SITE

mpdf Example 47. Progress bars simple custom <?php

Making the New Notes. Christoph Noack OpenOffice.org User Experience Max Odendahl OpenOffice.org Development Christian Jansen Sun Microsystems

TITLE SUBTITLE Issue # Title Subtitle. Issue Date. How to Use This Template. by [Article Author] Article Title. Page # Article Title.

Thesis GWU Example Dissertation. by Shankar Kulumani

A Road To Better User Experience. The lonely journey every front-end developer must walk.

Formatting Theses and Papers using Microsoft Word

Visual identity guideline. BrandBook BLOOMINGFELD. Brandbook 2016.

The POGIL Project Publication Guidelines

Version 1.4 March 15, Notes Bayer- Kogenate 2010 WFH Microsoft Surface Project (HKOG-39563) Information Architecture Wireframes

DFSA - Web Site Revamp

BBN ANG 183 Typography Lecture 5A: Breaking text

CLASP Website Redesign Client Deliverables Spring 2007

Compassion. Action. Change.

Wandle Valley Branding Guidelines 1

lipsum Access to 150 paragraphs of Lorem Ipsum dummy text a

This is the Title of the Thesis

G2E Web Banners: 200 x 100 Signature. 160 x 160 Social Media. 125 x 125 web button

IDENTITY STANDARDS LIVINGSTONE COLLEGE DR. JIMMY R. JENKINS, SR. PRESIDENT

TUSCALOOSA CITY SCHOOLS Graphic Standards and Logo Use Guide

The pdfreview package

src0-dan/mobile.html <!DOCTYPE html> Dan Armendariz Computer Science 76 Building Mobile Applications Harvard Extension School

My tags Ornare sociosqu, magna, nunc, erat duis, elit malesuada, arcu, quam ut. > View all. Recommended content

Viewport, custom CSS, fonts

Brand identity design. Professional logo design + Branding guidelines + Stationery Designed by JAVIER

Brand Guide. Last Revised February 9, :38 PM

Abstract. Author summary. Introduction

CITIZEN SCIENCE DATA FACTORY

The colophon Package, v1.1

Portfolio. Site design, wireframes and other diagrams. Abigail Plumb-Larrick. Plumb Information Strategy

BOWIE FARMERS MARKET. Anne Bontogon Campaign Bowie Farmers Market

Gestures: ingsa GESTURES

The rjlpshap class. Robert J Lee July 9, 2009

This page presents most of typographical aspects of JA Drimia. Make your readers happy with great Typography and User Experience!

WRAS WIAPS BRAND GUIDELINES 2015

Teach Yourself Microsoft Publisher Topic 2: Text Boxes

OCTOBER 16 NEWSLETTER. Lake Mayfield Campground OR-LOW GOOD TIMES

Brand guidelines. Introduction These guidelines define the basic elements of the Concept Smoke Screen brand.

RML Example 48: Paragraph flow controls

CORPORATE IDENTITY MANUAL

THE ESPRESSO BOOK MACHINE PUBLISH INSTANTLY AT THE MSU LIBRARIES

Identity Guidelines Version_1

CLASSES are a way to select custom elements without using a tag name

Certified Organisation logo guidelines. Version 1.0 April 2018

Personal brand identity desigend by JAVIER

SHEFA STORE CORPORATE DESIGN MANUAL BRAND & FUNCTION // CORPORATE DESIGN GUIDELINES. 01 : Corporate Identity. 02 : Corporate Stationery

<!-- Bootstrap core CSS --> <link href=" ap.min.css" rel="stylesheet">

Let's take a look at what CSS looks like in Dreamweaver using the "Embedded" coding which is the styles are within the html code and not separate.

Customer Journey EIV and emsfaa. January 2018

Visual Identity Standards

Style guide. March 2017 CC BY 4.0 The Tor Project

Foundation Site Global Elements

CHI LAT E X Ext. Abstracts Template

DISTRIBUTED MEMORY COMPUTING IN ECONOMICS USING MPI

Ghislain Fourny. Big Data 2. Lessons learnt from the past

Activity concentration for exempt material (Bq/g)

Invoice Visual Design Specifications MEC

Transcription:

mpdf Example 5. Tables <?php $html = ' <h1>mpdf</h1> <h2>tables</h2> <h3>css Styles</h3> <p>the CSS properties for tables and cells is increased over that in html2fpdf. It includes recognition of THEAD, TFOOT and TH.<br />See below for other facilities such as autosizing, and rotation.</p> <table border="1"> <tbody>row 1This is datathis is data Row 2 <td style="background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;"> <p>this is data p</p> This is data out of p <p style="font-weight:bold; font-size:20pt; background-color:#ffbbff;">this is bold data p</p> <b>this is bold data out of p</b><br /> This is normal data after br <h3>h3 in a table</h3> <div>this is data div</div> This is data out of div <div style="font-weight:bold;">this is data div (bold)</div> This is data out of div <p>more data</p><p style="font-size:12pt;">this is large text</p> <p>row 3</p><p>This is long data</p>this is data <p>row 4 <td> cell</p>this is data Row 5 Row 6 Row 7 Row 8 <p>this table has padding-left and -right set to 5mm i.e. padding within the cells. Also border colour and style, font family and size are set by <acronym>css</acronym>.</p> <table align="right" style="border: 1px solid #880000; font-family: Mono; font-size: 7pt; " class="widecells"> <tbody>row 1This is datathis is data Row 2<p>This is data p</p><p>more data</p> <p>row 3</p><p>This is long data</p>this is data <p>row 4 <td> cell</p>this is data Row 5 Row 6 Row 7 Row 8 <p>this table has padding-top and -bottom set to 3mm i.e. padding within the cells. Also background-, border colour and style, font family and size are set by in-line <acronym>css</acronym>.</p> <table style="border: 1px solid #880000; background-color: #BBCCDD; font-family: Mono; font-size: 7pt; " class="tallcells"> <tbody>row 1This is datathis is data Row 2<p>This is data p</p><p>more data</p> <p>row 3</p><p>This is long data</p>this is data

<h3 style="margin-top: 20pt; margin-collapse:collapse;">table Styles</h3> <p>the style sheet used for these examples shows some of the table styles I use on my website. The property \'topntail\' defined by a border-type definition e.g. "1px solid #880000" puts a border at the top and bottom of the table, and also below a header row (thead) if defined. Note also that <thead> will automatically turn on the header-repeat i.e. reproduce the header row at the top of each page.</p> <p>bpmtopic Class</p> <table class="bpmtopic"><thead></thead><tbody> Row 1 This is data This is data Row 2 <p>this is data p</p> <p>more data</p> <p>row 3</p> <p>this is long data</p> This is data <p>row 4 <td> cell</p> This is data Row 5 Row 6 Row 7 Row 8 <p>bpmtopic<b>c</b> Class (centered) Odd and Even rows</p> <table class="bpmtopicc"><thead> <tr class="headerrow"><th>col/row Header</th> <p>second column header p</p>

Third column header </thead><tbody> <tr class="oddrow"><th>row header 1</th> This is data This is data <tr class="evenrow"><th>row header 2</th> <p>this is data p</p> <tr class="oddrow"><th> <p>row header 3</p> </th> <p>this is long data</p> This is data <tr class="evenrow"><th> <p>row header 4</p> <p><th> cell acting as header</p> </th> This is data <tr class="oddrow"><th>row header 5</th> <tr class="evenrow"><th>row header 6</th> <tr class="oddrow"><th>row header 7</th> <tr class="evenrow"><th>row header 8</th> <p>bpmtopntail Class </p> <table class="bpmtopntail"><thead></thead><tbody> Row 1 This is data This is data Row 2 <p>this is data p</p>

<p>row 3</p> <p>this is long data</p> This is data <p>row 4 <td> cell</p> This is data Row 5 Row 6 Row 7 Row 8 <p>bpmtopntail<b>c</b> Class (centered) Odd and Even rows</p> <table class="bpmtopntailc"><thead> <tr class="headerrow"><th>col/row Header</th> <p>second column header p</p> Third column header </thead><tbody> <tr class="oddrow"><th>row header 1</th> This is data This is data <tr class="evenrow"><th>row header 2</th> <p>this is data p</p> <tr class="oddrow"><th> <p>row header 3</p> </th> <p>this is long data</p> This is data <tr class="evenrow"><th> <p>row header 4</p> <p><th> cell acting as header</p>

</th> This is data <tr class="oddrow"><th>row header 5</th> <tr class="evenrow"><th>row header 6</th> <tr class="oddrow"><th>row header 7</th> <tr class="evenrow"><th>row header 8</th> <p>topntail Class</p> <table class="bpmtopntail"><thead> <tr class="headerrow"><th>col and Row Header</th> <p>second</p> <p>column</p> <td class="pmhtopright">top right align </thead><tbody> <tr class="oddrow"><th> <p>row header 1 p</p> </th> This is data This is data <tr class="evenrow"><th>row header 2</th> <td class="pmhbottomright"><b><i>bottom right align</i></b> <p>this is data. Can use</p> <p><b>bold</b> <i>italic </i><sub>sub</sub> or <sup>sup</sup> text</p> <tr class="oddrow"><th class="pmhbottomright"> <p>bottom right align</p> </th> <td class="pmhmiddlecenter" style="border: #000000 1px solid"> <p>this is data. This cell</p> <p>uses Cell Styles to set</p> <p>the borders.</p> <p>all borders are collapsible</p> <p>in mpdf.</p> This is data <tr class="evenrow"><th>row header 4</th> <p>this is data p</p> More data <tr class="oddrow"><th>row header 5</th> <td colspan="2" class="pmhtopcenter">also data merged and centered

<h4>lists in a Table</h4> <table class="bpmtopntail"><thead> <tr class="headerrow"><th>col and Row Header</th> <p>second</p> <p>column</p> <td class="pmhtopright">top right align </thead><tbody> <tr class="oddrow"><th> <p>row header 1 p</p> </th> This is data This is data <tr class="evenrow"><th>row header 2</th> <ol> <li>item 1</li> <li>item 2 <ol type="a"> <li>subitem of ordered list</li> <li>subitem 2 <ol type="i"> <li>level 3 subitem</li> <li>level 3 subitem</li> </ol> </li> </ol> </li> <li>item 3</li> <li>another Item</li> <li>subitem <ol> <li>level 3 subitem</li> </ol> </li> <li>another Item</li> </ol> Unordered list: <ul> <li>item 1</li> <li>item 2 <ul> <li>subitem of unordered list</li> <li>subitem 2 <ul> <li>level 3 subitem</li> <li>level 3 subitem</li> <li>level 3 subitem</li> </ul> </li> </ul> </li> <li>item 3</li> </ul> <h4>automatic Column Width</h4>

<table class="bpmtopntail"><tbody> Causes Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> Suspendisse potenti Mechanisms Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. <h4>colspan & Rowspan</h4> <table class="bpmtopntail"><tbody> <td rowspan="2">causes <td colspan="2">nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> Suspendisse potenti Fusce eleifend neque sit amet erat.<br /> Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. <h4>table Header & Footer Rows</h4> <p>a table using a header row should repeat the header row across pages:</p> <p>bpmtopic<b>c</b> Class</p> <table class="bpmtopicc"> <thead> <tr class="headerrow"><th>col and Row Header</th> <p>second column header</p> Third column header </thead> <tfoot> <tr class="footerrow"><th>col and Row Footer</th> <p>second column footer</p> Third column footer </tfoot> <tbody> <th>row header 1</th> This is data This is data <th>row header 2</th> This is data

<th> <p>row header 3</p> </th> This is data <th>row header 4</th> This is data <th>row header 5</th> <th>row header 6</th> <th>row header 7</th> <th>row header 8</th> <th>row header 9</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th> <th>another Row header</th>

<h3>autosizing Tables</h3> <p>periodic Table of elements. Tables are set by default to reduce font size if complete words will not fit inside each cell, to a maximum of 1/1.4 * the set font-size. This value can be changed by setting $mpdf->shrink_tables_to_fit=1.8 or using html attribute <table autosize="1.8">.</p> <h5>periodic Table</h5> <table style="border:1px solid #000000;" cellpadding="9"><thead> <th>1a</th><th>2a</th><th>3b</th><th>4b</th><th>5b</th><th>6b</th><th>7b</th><th>8b</th><th>8b</th ><th>8b</th><th>1b</th><th>2b</th><th>3a</th><th>4a</th><th>5a</th><th>6a</th><th>7a</th><th>8a</th></ tr></thead><tbody> <td colspan="18"> H <td colspan="16"> He Li Be <td colspan="10"> B C N O F Ne Na Mg <td colspan="10"> Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo

Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac <td colspan="15"> <td colspan="18"> <td colspan="3"> Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu <td colspan="3"> Th Pa U Np Pu Am Cm Bk

Cf Es Fm Md No Lr <pagebreak /> <h3>rotating Tables</h3> <p>this is set to rotate -90 degrees (counterclockwise).</p> <h5>periodic Table</h5> <p> <table rotate="-90" class="bpmclearc"><thead> <th>1a</th><th>2a</th><th>3b</th><th>4b</th><th>5b</th><th>6b</th><th>7b</th><th>8b</th><th>8b</th ><th>8b</th><th>1b</th><th>2b</th><th>3a</th><th>4a</th><th>5a</th><th>6a</th><th>7a</th><th>8a</th></ tr></thead><tbody> <td colspan="18"> H <td colspan="15"> He Li Be <td colspan="10"> B C N O F Ne Na Mg <td colspan="10"> Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se

Br Kr Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac <td colspan="18"> <td colspan="3"> Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu

<td colspan="3"> Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr <pagebreak /> <h3>rotated text in Table Cells</h3> <h5>periodic Table</h5> <table> <thead> <tr text-rotate="45"> <th><p>element type 1A</p><p>Second line</p><th><p>element type longer 2A</p></th> <th>element type 3B</th> <th>element type 4B</th> <th>element type 5B</th> <th>element type 6B</th> <th>7b</th><th>8b</th> <th>element type 8B R</th> <th>8b</th> <th>element <span>type</span> 1B</th> <th>2b</th> <th>element type 3A</th> <th>element type 4A</th> <th>element type 5A</th> <th>element type 6A</th> <th>7a</th> <th>element type 8A</th> </thead> <tbody> H <td colspan="15"> He Li Be <td colspan="10"> B C N O F Ne Na Mg <td colspan="10"> Al

Si P S Cl Ar <tr style="text-rotate: 45"> K Ca Sc Ti Va Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru <td style="text-align:right; ">Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra <td colspan="16">ac

<td colspan="3"> Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu <td colspan="3"> Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr '; //============================================================== //============================================================== //============================================================== include("../mpdf.php"); $mpdf=new mpdf('c','a4','','',32,25,27,25,16,13); $mpdf->setdisplaymode('fullpage'); $mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list // LOAD a stylesheet $stylesheet = file_get_contents('mpdfstyletables.css'); $mpdf->writehtml($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text $mpdf->writehtml($html,2); $mpdf->output('mpdf.pdf','i'); exit; //============================================================== //============================================================== //==============================================================?>