Mpdf 7 pagebreak html bug with hidden and margin header - mpdf

Mpdf with some general parameters :
$this->SetDisplayMode("fullwidth",'single');
$this->autoPageBreak=true;
$this->setAutoTopMargin='pad';
$this->setAutoBottomMargin='pad';
Mpdf header parameters :
$this->DefHTMLHeaderByName("myHeader1","<div>HEADER<br>HEADER<br>HEADER<br>HEADER<br>HEADER<br>HEADER<br>HEADER<br></div>");
$this->SetHTMLHeaderByName("myHeader1",'O');
Example code html with WriteHTML :
<table><tbody><tr><td></td></tr></tbody></table>
<br>
<pagebreak even-footer-value="1" even-header-value="-1" odd-footer-value="1" even-header-name="myHeader2" odd-header-value="-1" type="NEXT-ODD"></pagebreak>
<div>sfndjkhsfjsf</div>
Result PDF with 2 pages and on the second page the margin is not respected. The header is removed but not its height. In version Mpdf 6 this bug was not present :
click pdf example
How to correct this error ?
Thank you for your help

Related

Wordpress anchor tag contents moved out after switching to visual and back to text mode

Using <a name="foobar">Hello</a> in the text mode editor and switching to visual mode and back to text editor results in 'Hello'. Using latest wordpress 4.8.2. Anchor tag itself works but not sure why the contents are moved out of the a tag. Any idea?
This is the default behaviour of TinyMCE - the default WP editor, and also used in many other applications.
The format you are using is valid according to the HTML 4.01 spec:
<a name="foobar">Hello</a>
However when you use TinyMCE to insert anchors into content, it uses the following format:
<a name="foobar"></a>
...and it appears that it enforces this structure, even if you manually add an anchor manually with text between the tag.
However, you can use any tag (not just <a>) to define the anchor point, if you need to have text in your anchor. The following example from the HTML 4.01 spec shows an id on a h2 tag being used as the anchor:
Section Two
//...later in the document
<h2 id="section2">Section Two</h2>
So if you want to keep the structure you have, you can change your anchor to
Go to foobar
[...]
<p id="foobar">Hello</a>
Note on HTML5 the name attribute of the <a> tag has been deprecated in HTML 5 - use id instead
Hope that helps :)

Anchor tag issue in Firefox

I have an HTML file which contains anchor tag with the link to another HTML file.
When I click on the link in firefox, its not opening the other HTML file. Please refer the below HTML snippet:
<html>
<body>
<table align=left border=1>
<tr><th>Report Name</th></tr>
<tr><td><a href="G:\parent directory\Report\Forms Report Summary_2015-08-25 102050.html" target=report_page>Missing Forms Report</a></td></tr>
</table>
</body>
The issue is that when the link in "href" is clicked and opened in new Firefox window inseted of "G" (capital letter) "g"(small letter) is displayed in Firefox and I get error page not displayed. I am strugggling to understand why Firefox is taking the "G" in caps as small letter "g".
Can someone please help me out here?
However, when I open the same link in Chrome or IE its opening fine.
The specifications of anchors expect a valid uri with a protocol as href:
i.e file, ftp, and mailto or an url fragment #
https://developer.mozilla.org/en/docs/Web/HTML/Element/a#attr-href
In your example it think you need the file
This should work in your case: (check also to escape it, some browsers do strange different things)
<a href="file:///G:\parent directory\Report\Forms Report Summary_2015-08-25 102050.html" target=report_page>Missing Forms Report</a>

Mediawiki - Links not showing up in galleries

I made a gallery in MediaWiki with this code:
<gallery caption="a caption" captionalign="center" bordersize="medium" perrow=4 widths="110">
File:blabla1.jpg|'''Caption1'''|link=Page 1
File:blabla2.jpg|'''Caption2'''|link=Page 2
</gallery>
Ok, the gallery works, but the caption of the first image is: Caption1|link=Page 1
And the caption of the second image is: Caption2|link=Page 1
So the links are not recognized and are included in the caption
What can be wrong? I am using MediaWiki 1.19, I've also tried to write File:blabla2.jpg|link=Page 2|'''Caption2''' with no results
This looks like a bug in 1.19. You should upgrade, because this seems to work in later versions.
Here is a sample of it working in MW 1.22: https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=803401

Why is my footer not aligned at center on pages without a sidebar?

My footer isn't aligned at the center on pages without a sidebar. On pages with a sidebar, the alignment is perfectly fine. Why is this happening? Can anyone help please?
Here's a link to the site I'm working on: http://www.thesuperwomanlifestyle.com/
The home page has no sidebar so the footer isn't aligned at the center. If you check other pages that have a sidebar, the alignment is alright.
Please help!
Fix your code errors, like the missing closing </p> and </div> tags. Those errors will throw the footer out of alignment. See [Invalid] Markup Validation of thesuperwomanlifestyle.com - W3C Markup Validator. Scroll down in the validation report to see line numbers and source code. Find the source in index.php and footer.php, but that depends on your theme. Start fixing the code errors and revalidate.
And fix the BOM file type of your header.php and index.php files, as per the warning in the validation report. Change them to unicode no BOM.
I have checked your code by using view source page for both home page and inner pages. I found that in home page the is inside and in inner pages the is outside .
So check your PHP template file for inner pages and close the div of "insidewrap" after footer's div.
Hope it solves your problem.
There are several reasons, in your footer you have diferent code in the diferent sections, and there are a image than not loads. Due to you use IDs for the DIVs, should be a good solution make the DIVs floating in the CSS code.
<div id='footer_left'>
<img src='http://www.christiflynn.com/wp-content/uploads/2014/03/Take-the-Lead3.jpg' />
</div>
<div id='footer_optin'>
<script type="text/javascript" src="//www1.moon-ray.com/v2.4/include/formEditor/genbootstrap.php?method=iframe&uid=p2c9303f30&version=1"></script>
</div>
#footer_left, footer_optin {
float:left;
width: 10em;
}
You might need to create another footer-page.php template. Then, rearrange another footer. Call the footer template by using get_footer('page');
Of course, when creating this, you will need to create a new template for footer so you can move it to the left.
If it's possible, we'd like to see your code for footer and the page code, please, so we can solve the problem.

Not able to see icons in android-4.2

I am not able to see the icon in android-4.2 but can see in lower versions. Can anyone explain what is the issue? Here is the html body:
<div class="ss-symbolicons-block ss-car" data-rel="test"></div>
You can find the sample icon here:
http://jsfiddle.net/72k8n/1/
It looks in Android-4.2.1 like:
And in Android-4.0.4 like:
We are using these files for displaying icons:
http://apps.innofied.com/sencha/anand/symbolset/ss-symbolicons-block.css
http://apps.innofied.com/sencha/anand/symbolset/ss-symbolicons-block.svg
http://apps.innofied.com/sencha/anand/symbolset/ss-symbolicons-block.ttf
http://apps.innofied.com/sencha/anand/symbolset/ss-symbolicons-block.woff
I tried adding z-index : 1 to the parent container and that is working fine

Resources