Quantcast
Channel: All Discussions - mPDF Forum
Viewing all 108 articles
Browse latest View live

Prevent repeate thead

$
0
0
Dear Ian,

is it possible to prevent the repeat of a thead?
Like:
<table repeat_header="0"> or
<thead repeat_header="0"> or <tfoot repeat_header="0"> is defined

Thanks

Frank

Can't get PDF to render

$
0
0
I've been using MPDF for quite a while without any trouble, but today, when I tried to generate a simple HTML page, I get the text below in my browser; can anyone tell me why I'm getting that?

%PDF-1.4 %���� 3 0 obj <> /Contents 4 0 R>> endobj 4 0 obj <> stream x�=̽ �0���\��� �I0���V��l� �@��}�����q5~�di�k����?ӟuR}�������N=�8��Zo®%&X��k�a,i�"������u��鮖����� endstream endobj 1 0 obj <> endobj 5 0 obj <> endobj 6 0 obj <> endobj 2 0 obj <> /ExtGState << /GS1 5 0 R >> >> endobj 7 0 obj << /Producer (��mPDF 6.0) /Title (��Untitled Document) /CreationDate (20150817225343+01'00') /ModDate (20150817225343+01'00') >> endobj 8 0 obj << /Type /Catalog /Pages 1 0 R /OpenAction [3 0 R /XYZ null null 1] /PageLayout /OneColumn >> endobj xref 0 9 0000000000 65535 f 0000000411 00000 n 0000000659 00000 n 0000000015 00000 n 0000000223 00000 n 0000000500 00000 n 0000000561 00000 n 0000000775 00000 n 0000000944 00000 n trailer << /Size 9 /Root 8 0 R /Info 7 0 R /ID [ ] >> startxref 1053 %%EOF

How to put index at second page on the pdf

$
0
0
Ive used an earlier version of this lib, but now when im usign this new version I cannot get the same result as I did with the older one.
Im trying to put the index right after the cover, is there a way for me to do that? The index is not respecting the tag on the element. It always go to the last page.

Colored border on pages with dynamic page break

$
0
0
Hi all 

I wonder if it is possible to set a colored page border on a multiple page document with dynamic page breaks. I seem not to find a solution in the manual

your help is much appreciated!

Is it possible to break long links at '/' character

Specific Languages (Bengali) mPDF6

$
0
0
Hi, so I updated the mPDF version and was trying to update the code I am using, which takes a very long time to generate the desired PDFs. 

Right now I am facing issues with one language in particular: Bengali. 

All other languages are working fine after I changed the text in the CSS to: 
font-family:"freeserif";

All, except for Bengali fonts which appear as squares with question marks inside. 

I've gone through the documentation, and it says that to make it work I will need to enable two things:
$mpdf->autoLangToFont = true; 
$mpdf->autoScriptToLang = true;

Which I have done. No change. Bengali still doesn't work. I see it in Config font file. Do I need to enable something in config.php?

UCDN::SCRIPT_BENGALI => 'bn', (config_script2language.php)

CASE "bn":  CASE "ben": // BENGALI; Bangla  (config_lang2fonts.php)
$unifont = "freeserif";
break;

Am I missing something? It's frustrating because all other languages are working fine and the documents I work with have multiple languages on a single page that is generated by the users themselves and the HTML changes quite often. I was handling this the last time with a Case Break php function, which chose which font to use for that particular part, but lead to loading times that were quite long.

PHP Notice in MPDF Version 5.7.4

$
0
0
HI
i am using MPDF version 5.7.4. and getting Notices and Warnings as followings please help me resolve all type of Notices/warnings. 

PHP Notice: Undefined property: mPDF::$hasOC in /MPDF/mpdf.php on line 9001

PHP Notice: Undefined index: TD>>ID>> in /MPDF/classes/cssmgr.php on line 1067

PHP Notice: Undefined index: BODY in /MPDF/classes/cssmgr.php on line 1026

PHP Notice: Undefined offset: -1 in /MPDF/classes/cssmgr.php on line 1206

UseTemplate within HTML markup or other solution to below 'challange'

$
0
0
Hey there,

Our system creates 2 pages containing information and which should then be printed onto a specific template where the end result is a 'table tent' (http://carrensoriano.deviantart.com/art/table-tents-template-types-216097859 second example). We've managed to place both pages on a single page by using 'ImportPage' but the end result should have the second page rotated 180 degrees thus turning it up side down. Would this be possible and preferably in combination with writeHTML ?

Value attributes in lists

$
0
0
Hi Ian,

It looks like you had mentioned adding support for value attributes in list items coming in version 6: http://www.mpdf1.com/forum/discussion/2311/numbered-list-issue/p1.

Doesn't look like it made it from the release notes though. Any plans on future updates including that functionality? Unfortunately, sometimes when people copy and paste from Word it creates the bizarre HTML structure like below and I'm trying to figure out the best way to handle it.

<ol>
  <li value="1">Number 1</li>
</ol>
<ol>
  <li value="2">Number 2</li>
</ol>

Thanks in advance!
Pete

Headers like ...?

$
0
0
Hello Forum,

is there a way to define html-headers like <table name="PageHeader">....</table> without using <htmlpageheader>? I've tried using 

$mpdf->SetHeaderByName('PageHeader');

but in doesn't work. Background: custom html-tags in tinymce are automatic covered in p-tags but tables are not allowed inside p-tags. Maybe there is a way to define "<table name...>..." and cover these code with <htmlpageheader> before feeding mpdf.

tnx Rolf

Difference between versions 5.3, 5.7 and 6.0

$
0
0
I've got a document which is mainly formatted by css using many podition: absolute for example.

When it's done by versions 5.3 and 6.0 it works fine, but when it's done by 5.7 nothing works and my document is all unformated.

Does it has anything to do whith 5.7 version?

Thanks in advance.

Two same exact images in two different palces do not display

$
0
0
If I put an image in more than one place it either stops showing everywhere, or just is displayed at the last spot, but removed from everywhere else.
The images are both identical, same source.

EDIT: To note: this happens only with identical images, and only if used before the half point(there are images in the middle). After it the images display correctly, even if used multiple times. I've checked the HTML more than 5 times now, I don't see what might be causing this.

Support for page-break-inside working in mPDF 6.0?

$
0
0
Hi all,

Although page-break-inside: avoid; is shown in the mPDF manual as supported CSS, I have not seen it working with a two-column document. For example if a div is broken over the page end, using this parameter for the div class in question makes no difference to the output with mPDF 6.0.

Has anyone had it working, and if so, how did you use it please?

Thanks!

Daniel

Content table can possible without new pages or blank pages it add by default ?

in landscape page is it possible to page no in left corner and next page no in right corner in short

$
0
0
in landscape page is it possible to page no in left corner and next page no in right corner in short two page no in one real page.

pass SVG in php variable

$
0
0
Hello,
Iam facing a problem with pass SVG graphics via php variable.

via ajax I send the SVG and in PHP I get it with POST.....because the svg contains " "  so in next variable I via str_replace change them to  '
$svg = $_POST['structureSVG'];
$svg_pdf = str_replace('"', '\'', $svg); //change " to '

to make me sure, that the variable contains real string with xml I proof:
var_dump($svg_pdf);
    //shows string which contains xml/svg
<svg>...</svg>

So I pass the SVG to render PDF:
$html = " <div> $svg_pdf </div> ";
$mpdf -> WriteHTML($html);
$mpdf -> Output('pdf/test_svg.pdf', 'I');

but unfortunately the SVG is not rendered in PDF

generating PDF from DIVs using Bootstrap CSS

$
0
0
Hi, I don't know if anybody else has come across this, but I'm having a bit of a hard time trying to generate a PDF report from HTML source that is using mainly Bootstrap3 CSS styles.

This is irrelevant if you don't use Bootstrap, but by default there are up to twelve columns in each DIV. My report renders correctly on the screen, but when I run it through mPDF, several of the right-hand columns overflow onto the next line. I recently converted the whole site I am working on from an out-of-date Table based layout to one constructed with just DIVs.

It works fine if I swap back my old table based layout, but that seems to have no problem using up to twelve columns. I tried to change the format to landscape, but it still overflows.

I've tried various things over the last couple of days, and I'm a bit stumped. I'm guessing there could be something in the Bootstrap3 CSS file that could be causing a conflict. 

So, I'm wondering if anybody else has had a similar issue.

Thanks
Regards
Neil.

incorrect image size in Adobe Reader DC

$
0
0

I'm having problems displaying images correctly in PDFs' generated
with mPDF with Adobe Reader DC. It seems like the image is being
rendered too big, even though I view the PDF in true size. I don't have
the problems when using the internal viewers of Chrome and Firefox.


Used gif,png and jpg but no difference in rendering.

I also tried version 5.6, 5.7 and 6 but no difference.

I dont know if its possible to post images in this post, but i also posted the question on so forumdifferences in each viewer where you can see the different images in each viewer.

http://stackoverflow.com/questions/32073396/mpdf-incorrect-image-size-in-adobe-reader-d

Sample image: http://test.onbereikbaar.nl/testlogo.png
PDF generated with mPDF: http://test.onbereikbaar.nl/testpdf.pdf 

using anchors with rtl content not working

$
0
0
Hi , I have recently switched to mpdf for creating pdfs on my website.

I am having some problems with creating anchors when I have rtl content in the pdf (hebrew charchters)

for example the following anchor works:
$mpdf = new mPDF('');
$mpdf->WriteHTML('<a href="#top">only english works</a>');
$mpdf->addPage();
$mpdf->WriteHTML('<a name="top">top</a>');
$mpdf->Output();


The foolowing examples dont work:
$mpdf = new mPDF('he');
$mpdf->WriteHTML('<a href="#top">only english works עברית</a>');
$mpdf->addPage();
$mpdf->WriteHTML('<a name="top">top</a>');
$mpdf->Output();

$mpdf = new mPDF('');
$mpdf->WriteHTML('<a href="#top">only english works עברית</a>');
$mpdf->addPage();
$mpdf->WriteHTML('<a name="top">top</a>');
$mpdf->Output();
Thanks alot.

using anchors to target annotations

$
0
0
Hi, I'm using ancors with mpdf to target annotaions, 
I'm currently creating an anchor to the page of the annotation, and not to the annotation itself.
Is it poosible to create an anchor to the annotation itself? so clicking on a link will take you to the annotaion 
and poosibly even focus it? (for example like the behaviour in adobe reader when go you to the comments menu and click on a comment?)

Viewing all 108 articles
Browse latest View live