Whilst small files can be uploaded to forum posts, if you have a custom theme or module to contribute please add it on the "Add-ons" page.

TOPIC: [SOLVED] FancyTree PDF new page

FancyTree PDF new page 6 months 1 week ago #1

  • GuzziZander
  • GuzziZander's Avatar
  • Offline
  • New
  • Posts: 1
Hello,

How I can introduce a new page after every generation in

How do I enter a new page after each generation in FancyTreeViewPDF?
I have modified the file PdfTemplate.php but i can't get to work.

	foreach ($html_chunks as $html_chunk) {

		// write html body parts only (option 2);
		if ($i === 1) {
			// first chunk (initialize all buffers - init=true)
			$mpdf->WriteHTML($html_chunk, 2, true, false);
		} elseif ($i === $chunks) {
			// last chunck (close all buffers - close=true)
			$mpdf->WriteHTML($html_chunk, 2, false, true);
		} else {
			// all other parts (keep the buffer open)
			$mpdf->WriteHTML($html_chunk, 2, false, false);
		}
		$i++;

$mpdf->AddPage();	

	}

Greetings, Juanjo
The administrator has disabled public write access.

[SOLVED] FancyTree PDF new page 5 months 3 weeks ago #2

  • GuzziZander
  • GuzziZander's Avatar
  • Offline
  • New
  • Posts: 1
In the pdf.js file i modified the modifyContent function:
function modifyContent(content) {
	// first reset the special blockheader in the colors and clouds theme back to default
	jQuery("table.blockheader", content).each(function() {
		jQuery(this).replaceWith('<div class="blockheader">' + jQuery(this).html() + '</div>');
	});
// Added
	jQuery(".blockheader", content).each(function() {
		jQuery(this).prepend('<pagebreak type="next-odd" />');
	});

        ...
Last Edit: 5 months 3 weeks ago by GuzziZander.
The administrator has disabled public write access.
Powered by Kunena Forum