Page 1 of 1

Page break ?

Posted: 13 Apr 2015, 17:46
by gulp
Hello,
I'm sorry if I'm posting a question that has already been asked, I can't find the right topic, but I suppose you're already working on this topic:
is there a way to set a pdf page break in the joomla editor as it will result in the pdf ?

Thank you for any suggestion

Re: Page break ?

Posted: 16 Apr 2015, 01:00
by Jan
Hi, there is no such option, so this needs to be customized directly in the code :-(

Jan

Re: Page break ?

Posted: 17 Apr 2015, 11:33
by gulp
Ok, could you suggest how/where in the code to implement it ?
Is there already a function that parses the html and convert it to a special call to the tcpdf class ?
Another solution could be to "keep together" some elements: the problem is when the page breaks automatically separating a text that is describing an image and these elements results in two different pages...

Thank you for any suggestion

Re: Page break ?

Posted: 19 Apr 2015, 00:04
by Jan
Hi, you should add some hidden tag into the article which will be not displayed on the site but can be read by pdf feature (or use the one set in standard Joomla! article)

if the article will have this tag: <tcpdf method="AddPage" /> then the tcpdf class will make new site.


Jan

Re: Page break ?

Posted: 02 May 2016, 12:45
by gulp
Hello,
what about updating the tcpdf to get the page break works automatically ?
http://stackoverflow.com/questions/1605 ... k-in-tcpdf

Re: Page break ?

Posted: 03 May 2016, 01:03
by Jan
Hi, thank you for information, I will update it in next version.

Jan

Re: Page break ?

Posted: 03 Oct 2016, 16:50
by Jan
Hi, I worked on new version and tested it, this work Ok in current version even in newest version. But you need to check if your editor (e.g. tinyMCE) does not skip the tag:

Code: Select all

<br pagebreak="true">
- if BR tag is not set in tinyMCE, change it to P tag:

Code: Select all

<p pagebreak="true"></p>
- if attribute pagebreak will be cut, you need to allow it in options of tinyMCE editor:

Joomla! administration - Plugins - Plugin - Editor - TinyMCE
Extended Valid Elements Extensions: p[pagebreak]

So if you set it, then if you add the following code to your article:

Code: Select all

<p pagebreak="true"></p>
then new page will be set.

Anyway: update to newest version: https://www.phoca.cz/news/903-phoca-pdf-3-0-3-released

Jan