Comments (5)
Thank you very much @colomet - this is a great help
from pressbooks-mpdf.
I could help a litle with that if you wish (It would be necesary a review from you once I finish but can be faster for you if I start maybe).
from pressbooks-mpdf.
what about that??
=== Pressbooks mPDF ===
Contributors: bdolor, greatislander
Donation link: https://github.com/BCcampus/pressbooks-mpdf
Tags: pressbooks, textbook, mPDF
Requires at least: 4.8.0
Tested up to: 4.8.0
Stable tag: 2.0.0
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Pressbooks mPDF
== Description ==
This plugin requires Pressbooks. Itβs aimed at developers/clients who need to print the Books as PDFs.
With Pressbooks mPDF you can export the book and download as PDF.
Pressbooks export system allow to export the Books in different formats, mPDF is a free pdf generator for Books (Parts, Chapters, Front Matter and Back Matter).
This makes Pressbooks mPDF a completely self contained PDF generating plugin.
Pressbooks saves your last 5 batches of exported files.
= Options =
- Page Size: Choose one of the standardized size of pages (A0, A1, A2 ,A3 ,A4, A5, A6, A7, A8, A9, A10, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, 4A0, 2A0, RA0, RA1, RA2, RA3, RA4, SRA0, SRA1, SRA2, SRA3, SRA4, Letter*, Legal, Executive, Folio, Demy, Royal, Type A paperback 111x178mm, Type B paperback 128x198mm).
- Left margin: Change the left margin size of the pages.
- Right margin: Change the right margin size of the pages.
- Mirror margins: The document will mirror the left and right margin values on odd and even pages.
- Cover image: Allow to Display the cover image as the first page of the pdf.
- Table of contents: Display the Table of contents in the pdf.
- Indent paragraphs: Enable indent the paragraphs.
- Hyphens: Enable hyphenation.
- Increase font size: Increase font size and line height for greater accessibility.
== Installation ==
IMPORTANT!
You must first install Pressbooks. This plugin won't work without it.
The Pressbooks github repository is updated frequently. Stay up to date.
= Using Git =
- cd /wp-content/plugins
- git clone https://github.com/BCcampus/pressbooks-mpdf.git
- Activate the plugin at the network level, through the 'Plugins' menu in WordPress
= OR, go to the WordPress Dashboard =
- Navigate to the Network Admin -> Plugins
- Search for 'Pressbooks mPDF'
- Click 'Network Activate'
= OR, upload manually =
- Upload
pressbooks-mpdf
to the/wp-content/plugins/
directory - Activate the plugin at the network level, through the 'Plugins' menu in WordPress
== Frequently Asked Questions ==
= What is PressBook?
Pressbooks is a content management and 'one button publishing' system for books.
= What is mPDF?
[mPDF](https://mpdf.github.io/: A PHP library to generate PDF files from HTML with Unicode/UTF-8 and CJK support
It is based on FPDF and HTML2FPDF with a number of enhancements.
The original author, Ian Back, wrote mPDF to output PDF files βon-the-flyβ from his website, handling different languages. It is slower than the original scripts e.g. HTML2FPDF and produces larger files when using Unicode fonts, but support for CSS styles etc. and has been much enhanced β see the features.
mPDF is also released under a GPLv2 license and made by people other than the authors of this plugin.
The mPDF class is large and not a development focus for pressbooks.com. Where the mPDF class has previously been a part of the pressbooks, it has now been removed.
Installing this plugin will restore the previous functionality that open source users have come to expect if the license fee for PrinceXML is a barrier.
= mPDF Main features =
Main features (as of version 7)
- Accepts UTF-8 encoded HTML
- Supports almost all languages including RTL (arabic and hebrew), and CJK - (chinese-japanese-korean)
- Bookmarks
- CSS stylesheets
- Word spacing and character spacing for justification
- Nested block-level elements (e.g. P, DIV) including margins, borders, padding, line-height, background colours etc.
- Support (partial) for floating and fixed-position block-elements
- Page layout and orientation
- Text-justification and hyphenation
- Page numbering
- Odd and even paging with mirrored margins
- Page headers & footers
- Columns
- Tables - nested tables, rotated, or autosized to fit on a page
- Table of contents
- Index
- Watermarks (with customizable text angle)
- Images in JPG, GIF, PNG, SVG, BMP or WMF format
- Password protection
- Annotations
- Barcodes (EAN13, UPC-A/E, Code 11, 39, 93, 128, Codabar, MSI, IMB, Planet, Postnet, RM4SCC etc.)
- Import another PDF file and use as a template
- Embedded font subsets
- PDF/A-1b support (ISO 19005-1:2005)
- PDF/X-1a support
- PDF/A-3 support (along with ZUGFeRD invoices compatibility)
= Page size Dimensions =
Dimensions Of A Series Paper Sizes
Size Width x Height (mm) Width x Height (in)
A0 841 x 1189 mm 33.1 x 46.8 in
A1 594 x 841 mm 23.4 x 33.1 in
A2 420 x 594 mm 16.5 x 23.4 in
A3 297 x 420 mm 11.7 x 16.5 in
A4 210 x 297 mm 8.3 x 11.7 in
A5 148 x 210 mm 5.8 x 8.3 in
A6 105 x 148 mm 4.1 x 5.8 in
A7 74 x 105 mm 2.9 x 4.1 in
A8 52 x 74 mm 2.0 x 2.9 in
A9 37 x 52 mm 1.5 x 2.0 in
A10 26 x 37 mm 1.0 x 1.5 in
Dimensions Of B Series Paper Sizes
Size Width x Height (mm) Width x Height (in)
B0 1000 x 1414 mm 39.4 x 55.7 in
B1 707 x 1000 mm 27.8 x 39.4 in
B2 500 x 707 mm 19.7 x 27.8 in
B3 353 x 500 mm 13.9 x 19.7 in
B4 250 x 353 mm 9.8 x 13.9 in
B5 176 x 250 mm 6.9 x 9.8 in
B6 125 x 176 mm 4.9 x 6.9 in
B7 88 x 125 mm 3.5 x 4.9 in
B8 62 x 88 mm 2.4 x 3.5 in
B9 44 x 62 mm 1.7 x 2.4 in
B10 31 x 44 mm 1.2 x 1.7 in
Dimensions Of C Series Envelope Sizes
Size Width x Height (mm) Width x Height (in)
C0 917 x 1297 mm 36.1 x 51.5 in
C1 648 x 917 mm 25.5 x 36.1 in
C2 458 x 648 mm 18.0 x 25.5 in
C3 324 x 458 mm 12.8 x 18.0 in
C4 229 x 324 mm 9.0 x 12.8 in
C5 162 x 229 mm 6.4 x 9.0 in
C6 114 x 162 mm 4.5 x 6.4 in
C7 81 x 114 mm 3.2 x 4.5 in
C8 57 x 81 mm 2.2 x 3.2 in
C9 40 x 57 mm 1.6 x 2.2 in
C10 28 x 40 mm 1.1 x 1.6 in
4A0 & 2A0 - The DIN 476 Oversize Formats
Size Width x Height (mm) Width x Height (in)
4A0 1682 x 2378 mm 66.2 x 93.6 in
2A0 1189 x 1682 mm 46.8 x 66.2 in
Dimensions Of RA & SRA Series Untrimmed Paper Sizes
Size Width x Height (mm) Width x Height (in)
RA0 860 x 1220 mm 33.9 x 48.0 in
RA1 610 x 860 mm 24.0 x 33.9 in
RA2 430 x 610 mm 16.9 x 24.0 in
RA3 305 x 430 mm 12.0 x 16.9 in
RA4 215 x 305 mm 8.5 x 12.0 in
SRA0 900 x 1280 mm 35.4 x 50.4 in
SRA1 640 x 900 mm 25.2 x 35.4 in
SRA2 450 x 640 mm 17.7 x 25.2 in
SRA3 320 x 450 mm 12.6 x 17.7 in
SRA4 225 x 320 mm 8.9 x 12.6 in
US Paper Sizes
Size Width x Height (mm) Width x Height (in)
Letter* 216 x 279 mm 8.5 x 11.0 in
Legal 216 x 356 mm 8.5 x 14.0 in
Executive 184.2 x 266.7mm 7.0 x 10.0 in
Folio 210 x 330 8.0 x 13.0 in
British Imperial Paper Sizes
Size Width x Height (mm) Width x Height (in)
Demy 450.9 x 571.5 mm 17.75 x 22.5 in
Royal 508.0 x 635.0 mm. 20.0 x 25.0 in
Type A paperback 111x178mm
Type B paperback 128x198mm
== Screenshots ==
- The mPDF options of the PDF export.
- Select the PDF (mPDF) format for exporting your book as PDF.
== Changelog ==
See: https://github.com/BCcampus/pressbooks-mpdf/commits/master for more detail
= 2.0.0 =
- Compatibility with Pressbooks 4.0.0
- Moved temp directories into uploads directory, eliminating the need for making subdirectories of the plugin writeable (fixes #19)
- Fixed an issue with mPDF theme options introduced by an earlier release of Pressbooks
= 1.7.0 (2017/05/31) =
- compatibility with Pressbooks 3.9.9
= 1.6.2.3 (2017/04/20) =
- compatibility with Pressbooks 3.9.8.2
= 1.6.2.2 (2017/04/18) =
- fix for redeclare htmlawed error
= 1.6.2.1 (2017/04/10) =
- compatibility with modifications to htmlawed dependency
= 1.6.2 (2017/04/07) =
- compatibility with Pressbooks 3.9.8 (props @greatislander)
= 1.6.1 (2017/02/08) =
- updated mPDF dependency to 6.1
- switched to composer for dependency management
= 1.0.1 (2015/12/15) =
- initial release
== How to contribute code ==
Pull requests are enthusiastically received and scrutinized for quality.
- The best way is to initiate a pull request on GitHub.
from pressbooks-mpdf.
from pressbooks-mpdf.
resolved via 58ce03d
from pressbooks-mpdf.
Related Issues (20)
- Feature request HOT 1
- Images and captions would not centre on PDF export HOT 2
- Feature request: Optimice pdf after creation HOT 3
- mPDF export fails on Pressbooks dev HOT 2
- Feature request: To no export parts setting option HOT 2
- Request for automatic numbering of bookmarks to be turned off HOT 2
- Languages exported as strange character HOT 2
- Improve github to svn workflow for WP repo
- Style inconsistencies between Prince and mPDF
- Sidebar textboxes don't appear as sidebars HOT 3
- Unable to change margins in mPDF theme options HOT 2
- Request for the ability to control font size in mPDF theme options
- PDF (for print) PDF (for digital distribution)
- Missing table in export HOT 3
- Request for the ability to set what text appears in the mPDF running headers HOT 4
- Automatic part/chapter numbering does not appear in table of contents
- mPDF bookmarks subsume Chapter matter under Front matter
- Long book titles appear in mPDF running headers, even when a short title is provided
- EventStream Connection Error when trying to export HOT 4
- Footnotes do not appear correctly HOT 2
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 pressbooks-mpdf.