Open Feelosov opened 4 years ago
As i see, its possible: https://mpdf.github.io/paging/page-breaks.html
Cit:
You can define or change all page characteristics when you add the new page: orientation
Issue solved: Add CSS into your file, for example:
@page horizontal { size: landscape; } div.horizontal-pdf-orientation { page: horizontal; page-break-before: left; }
and in your post add <div class="horizontal-pdf-orientation"></div>
- after this DIV all pages in PDF will have horizontal orientation.
Some more - register a tiny shortcode:
function dkpdf_pagebreak_shortcode_horizontal( $atts, $content = null ) {
$output = '<div class="horizontal-pdf-orientation"></div>';
return $output;
}
add_shortcode( 'dkpdf-pagebreak-horizont', 'dkpdf_pagebreak_shortcode_horizontal' );
So if you want vertical orientation after horizontal orientation , add new styles in your CSS for vertical.
Hi. This is best plugin of all. Can you do that: i change PDF orientation on fly for page posts? For example, i insert your short-code [dkpdf-pagebreak-horizontal] then [dkpdf-pagebreak-horizontal] then [dkpdf-pagebreak-vertical]