Giter VIP home page Giter VIP logo

mpdf-examples's Issues

Styling sup tags

Hello,

I'm have a difficult time trying to style a sup tag to fix line height issue. I see in your basic example https://github.com/mpdf/mpdf-examples/blob/development/pdf/sample_basic.pdf that the sup tag did not add any extra space above the line that its on. When I use tag in my html document I see extra spacing above the line that its on (see attachments). I have tried applying css to the mpdf stylesheet but it does not take effect, not even background color or borders work for me..

output from html page

output from mpdf pdf file

I have tried using this css code in the mpdf stylesheet but none of the properties take effect.

sup, .sup { line-height: .7em; top: -10px; font-size: 0.63em; padding-bottom: 20px; margin-bottom: 10px; border-bottom: solid 1px #000000; display: inline-block; background: yellow; }

Use static HTML for example files

Dynamic HTML (eg. random italics every 10-ish word in example14_page_numbers_ToC_Index_Bookmarks.php) makes comparing result files after codebase change rather difficult if not impossible.

MathJaxProcess.php doesn't work

Besides a syntax error in the file, the method $mpdf->ConvertSize() isn't available in latest development version of Mpdf.

Just after installing mPDF in new server, loading same SVG file fails

We was using mPDF without issues in a server but needed to move to a new Debian 8 server, but now mPDF is unable to show the same SVG and throws next message:
error: Uncaught exception 'Mpdf\MpdfException' with message 'Cannot read an undeclared property Mpdf\Writer\BackgroundWriter::$gradients' in /var/www/mpdf/vendor/mpdf/mpdf/src/Strict.php:54 Stack trace: #0 /var/www/mpdf/vendor/mpdf/mpdf/src/Writer/BackgroundWriter.php(149): Mpdf\Writer\BackgroundWriter->__isset('gradients') #1 /var/www/mpdf/vendor/mpdf/mpdf/src/Writer/ResourceWriter.php(134): Mpdf\Writer\BackgroundWriter->writePatterns() #2 /var/www/mpdf/vendor/mpdf/mpdf/src/Mpdf.php(9838): Mpdf\Writer\ResourceWriter->writeResources() #3 /var/www/mpdf/vendor/mpdf/mpdf/src/Mpdf.php(2015): Mpdf\Mpdf->_enddoc() #4 /var/www/mpdf/vendor/mpdf/mpdf/src/Mpdf.php(9329): Mpdf\Mpdf->Close() #5 /var/www/mpdf/boletin_completo.php(335): Mpdf\Mpdf->Output('/var/www/mpdf/g...', 'F') #6 {main} thrown in /var/www/mpdf/vendor/mpdf/mpdf/src/Strict.php on line 54
What could be the problem? Any ideas?

Thank you

Table with rounded border

My mpdf version is 6.0

I tried example05_tables.php worked fine but when I tried adding border-radius: 7px 7px 0 0; in style that didn't work. Is there anything else I need to add to add radius in table border? or this is a bug?

What's wrong ?

I have read the readme file which says to install composer and I did. Then I ran the command 'composer install' which returned no error:

$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
$ echo $?
0

Then I ran the first script:

$ php ./example01_basic.php
PHP Warning:  require_once(/Users/xxx/Documents/www/pdf2/mpdf-examples/../../../vendor/autoload.php): failed to open stream: No such file or directory in /Users/xxx/Documents/www/pdf2/mpdf-examples/example01_basic.php on line 171

Warning: require_once(/Users/xxx/Documents/www/pdf2/mpdf-examples/../../../vendor/autoload.php): failed to open stream: No such file or directory in /Users/xxx/Documents/www/pdf2/mpdf-examples/example01_basic.php on line 171
PHP Fatal error:  require_once(): Failed opening required '/Users/xxx/Documents/www/pdf2/mpdf-examples/../../../vendor/autoload.php' (include_path='.:') in /Users/xxx/Documents/www/pdf2/mpdf-examples/example01_basic.php on line 171

Fatal error: require_once(): Failed opening required '/Users/xxx/Documents/www/pdf2/mpdf-examples/../../../vendor/autoload.php' (include_path='.:') in /Users/xxx/Documents/www/pdf2/mpdf-examples/example01_basic.php on line 171
$ echo $?
255

I get the same result in the browser...

Am I missing something?

Images returned from tiger.php doesn't work

In example04_images.php, the images returned by tiger.php don't work.

When executing from the command line php example04_images.php > out.pdf, the file will contain [X] type of images, meaning that they failed to load.

When loading the script from the browser, it will get stuck forever loading.

Bug In HTML Output When page Get's long

Hey Guys,

I found a possible bug in MPDF 7 where if we populate the PDF file with enough content to fit one page, whether it's one table or 7, it works without an issue, but as soon as my 3rd table for example reaches the end of the page (by which point it should create a second page), The script no longer generates the PDF file, and I am met with an error message which reads: must precede in a table

I did notice while playing around, if I add a page break tag right before the table, it generates the PDF fine without any issues...
From what I can see, it look's like the issue pops up as soon as the data becomes longer than 1 page, and the page is not broken by me, so it would appear to be a bug in the auto page break?

Please let me know if you need any more info from me, and/or what a possible solution to the issue might be?

Incorrect output data from database records

I have this string in a sentence stored in the database:
"vóór"

but it will display as:
"vÃ3Ã3r"

while the same string hard coded in the html will display correctly.

Any help with this issue will be appreciated

Franco

Config error in example57_new_mPDF_v5-3_active_forms

The following properties are references in the example, but because of the refractor these are no longer directly accessible.

$mpdf->formUseZapD = false;

$mpdf->formUseZapD = false;
$mpdf->formSubmitNoValueFields = true;

$mpdf->formExportType = 'xfdf'; // 'html' or 'xfdf'
$mpdf->formSelectDefaultOption = true;	// for Select drop down box; if no option is explicitly maked as selected,
							// this determines whether to select 1st option (as per browser)
							// - affects whether "required" attribute is relevant
$mpdf->form_border_color = '0.0 0.820 0.0';
$mpdf->form_background_color = '0.941 0.941 0.941';
$mpdf->form_border_width = '1';
$mpdf->form_border_style = 'S';

$mpdf->form_radio_color = '0.0 0.820 0.0';
$mpdf->form_radio_background_color = '0.941 0.5 0.5';

$mpdf->form_button_border_color = '0.0 0.820 0.0';
$mpdf->form_button_background_color = '0.941 0.941 0.941';
$mpdf->form_button_border_width = '1';
$mpdf->form_button_border_style = 'S';

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.