DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:bookcreator:discussion

This is an old revision of the document!


bookcreator Plugin Discussion

Discussion page for the bookcreator plugin

There's always room for improvement. If you're able to add any contributions to make pdfbook better, please let me know or discuss your thoughts right here (please use ===== Level 2 Headlines ===== to open a new “thread”/issue and ---- (five dashes, horizontal rule) to structure it when needed).

Please report issues at the issue tracker:
https://github.com/Klap-in/dokuwiki-plugin-bookcreator/issues

The Plugin did not accept the selectet Pages

I can select and delete Pages, this is not the problem, but if i want to export or save my selection, the Plugin is telling me, that i did not select any pages.

I added “var_dump($_COOKIE)” to the syntax.php, the output is shown below.

array(3) { 
["bookcreator"]=> 
array(2) { 
["start"]=> 
string(1) "1" 
["andere"]=> 
string(1) "1" } 
["DokuWiki"]=> 
string(26) "a0d075bihtp4kvr476pr316ot0" 
["DW84669e0b736a85c6eeda0cf5b0a2b382"]=> 
string(27) "YWRtaW4=|0|cnVxUlAvTkdVR0E9" } 

Dokuwiki is running on my local system, Ubuntu 12.04, by using the latest version of Firefox. DW2PDF and Text are running correctly. I am using the “Vector” Template

The cookie “list-pagelist” is used when saving pages. That cookie is missing in your dump. Are you sure your javascript is working correct?
Can you check whether the console of your Developer Toolbar has javascript errors?
(Please report this issue in the issuetracker, than i can better follow this conversation.)
Klap-in 2014-07-01 11:54
First of all, i dont have an account on Github so I cant use the IssueTracker.
The second thing is, I checked out the Developers Toolbar and there appeared one errormassage for Javascript:
ReferenceError: jQuery is not defined js.php:4013
Is this problem about missing permissions on js.php? If you agree, which permissions should I give this script?
js.php is reached, so permissions are ok. This message tells something about a certain line of js.php, but I cannot give a conclusive diagnose with this information.
Is your wiki reachable via internet for me? Can you provide the url in that case, so that i can have a look?
A general remedy could be to update all your plugins to their latest version. There are old version of plugins know to be incompatible with current DokuWiki releases. But i don't know yet if that is the case here…
(You need to create a GitHub account indeed, then you can reach the issue tracker for this plugin, and many others as well. Open access tools are misused massively, therefore it is required for us to have a login-first tool in stead. Sorry for the extra registration it requires)
Klap-in 2014-07-01 16:15

Page selection problem 1/8/2014

I can select pages but when I go to save the selection I get the messages “You don't have pages selected yet.” I can delete pages selected successfully. I have verified cookies are created for each page. I do not have a cookie listing the pages if it should exist. I am wiki-admin with all permissions. FireFox 25.01 DokuWiki Weatherwax bookcreator is current as of 1/8/2014 - no output for “Text”, Printable Version or PDF dw2pdf is current as of 8/16/2013 and works properly from URL and tab button

Edit: Same here, FF 27, fresh installation of DokuWiki, bookcreator and dw2pdf on XAMPP / Win7

I created a bug report for you. Please provide there info so i can investigate the case.
https://github.com/Klap-in/dokuwiki-plugin-bookcreator/issues/17
Klap-in 2014/03/06 15:27

Problem with Firefox

Bookcreator is the perfect plugin for the needs of one of my sites. Unfortunately, it refuses to work when I use Firefox, and I have apparently the same problem with other Mozilla-like browsers. The resulting book is always empty. The exact same selection gives me a book with other browsers. Does anybody have the same problem ?
- Last version of Dokuwiki, Vector template.
Thanks Michel

Do you allow cookies?
Can you install firebug and inspect the cookies? is there a cookie list-pagelist? What is its content? — Klap-in 2013/06/13 12:22

Problem with Firefox & IE8

I have the same problem as above too:
FireFox is version 20.0.1
Internet Explorer 8.0.6001.18702
Dokuwiki is Version rc2013-0306
MonoBook Updated:2013-02-20
BookCreator seems to work then blank pdf and apache log had a “Warning: Call-time pass-by-reference has been deprecated - argument passed by value” Which is resolved by an entry below.

There is no apache log output for the resulting pdf. It was an empty page with a default header and footer. I was able to produce a pdf file using only the dw2pdf plugin by way of adding “do=export_pdf” to the URL .

Please update for compatibility with latest versions of Dokuwiki and MonoBook.
Thank you Martin T 5/8/2013

Do you allow cookies?
Is there a developer toolbar for IE? or someting to inspect the cookies? is there a cookie list-pagelist? What is its content? — Klap-in 2013/06/13 12:22

The book creation and pdf export are working fine for me, however all the links within the pdf still point to pages of the dokuwiki itself. Is there a way to make the plugin create internal links in the document (i.e. jumping directly to the desired section of the .pdf instead of opening a browser window)?

— Peter 2013/04/04 13:33

Command line PDF export

I have made a few PDF books and it works fine. I need to save them on a regular basis to keep the PDF versions of the books updated. Is it possible to make the export from command line? Regards Jonas

You can call the pdf book export by using the right url. Example:
http://yourwiki.org/wiki:ebooks?id=wiki%3Aebooks&pdfbook_title=Test+title%3A+test&do=export_pdfbook

where:

id = pagid of bookmanager
pdfbook_title = Document's title (in example this was: “Test title: test” (url encoded)
do = export_pdfbook is commando for exporting book

Firefox

With IE8 I seem to be able to select any page, but in firefox the number of pages you can select is limited (±20) when selecting more then it's max it replaces those pages with the new ones..

(How) Could this error be solved??

— Theo 18/05/2010

Probably to many cookies in Firefox? So less space remain for the cookie with pagenames.

print.css

To prevent the printing of the toolbar..

.dokuwiki div.bookcreator__panel { display: none }
.dokuwiki div.bookcreator__ { display: none }

Group bookmarks to namspace

I am searching for an option to group bookmarks to Section / Chapter e.g. namespsaces. Due the fact that the each wiki page with H1 starts at level 0. I would like to have a better overview with huge number of pages in my pdf. Regards, Tom 6/4/10

Latex Issue

The bookcreator don't fetch the latex images created by latex plugin. any ideas? — markuman 2011/01/17 12:00

I'm having a similar issue, even though I'm not using the latex plugin. Some images are not included in the generated PDFs… and I can't figure out what is so special about them. Other images show fine. All images that I have uploaded to the wiki are PNGs — FilipeCorreia 2012/08/22 18:11

more flexible syntax

the “book page” syntax is very restrictive and don't work with links created from the editor “internal link button”

To “flexify” this, you can edit the file “/plugin/bookcreator/syntax.php” and replace by this on line 164-188:

                $select= rawWiki($this->getConf('save_namespace').":".$_POST['page']);
                $lines = explode("\n", $select);
                $nr = count($lines);
                $titleRegex = "/^\\s*={3,6}\\s*([^=]*)\\s*={3,6}\\s*$/";
                $linkRegex = "/^.*\\[\\[:?([^|\\]]*)[^\\]]*\\]\\].*$/";
 
                for($n=0; $n<$nr; $n++) {
                  if (trim($lines[$n]) == '') continue;
 
                  if (!$title && preg_match($titleRegex, $lines[$n])){
                    $title = preg_replace($titleRegex, "$1", $lines[$n]);
                  } else if(preg_match($linkRegex, $lines[$n])){
                    $list[$n] = preg_replace($linkRegex, "$1", $lines[$n]);
                    $renderer->doc .= '
  <script type="text/javascript"><!--//--><![CDATA[//><!-- 
  book_changePage(\'bookcreator['.$list[$n].']\', 1, new Date(\'July 21, 2099 00:00:00\'), \'/\');
  //--><!]]></script>';
                    $i++;
                  }
                }

pdf files

Is it possible to embed pdf files in the book ? Would be very nice to be able to do so. Thank you.

Michel, 23-05-2011


ISSUE: handle non-english(utf-8) file name

If the file name is english, everything is OK. But when I try to add a page with Chinese file name, I get 400 Bad Request error. I checked the cookies stored, and find that cookie name is:

bookcreator[topic:linux-parallel:intel„ÑhÕh‰Å]

I think that's where the error comes.

I modified some JavaScript in the code and use urlencoded string in cookies. It seems that the problem is solved. You can check the code here

Not Scaling Well

Building larger books doesn't work well. After adding about 40 pages, the bookmarks begin to break down. Somewhere between 40 and 80 pages, the page goes blank after about a minute and the httpd logs show an Error 500. Would this be a timeout or memory issue that could be resolved with a configuration change?

Particulars are: MacOSX 10.4, Apache 1.3.41, Rincewind, dw2pdf plugin dated 2011-06-12.

You can try adding this line to the bottom of your conf/local.php to overcome any memory limitations (if that is the case):
ini_set('memory_limit', '-1');

— FilipeCorreia 2012/08/22 18:06
This needs improvements of the dw2pdf plugin. See https://github.com/splitbrain/dokuwiki-plugin-dw2pdf/issues/3

Problem with large book

I created a book of 82 pages (counting according to the toolbar), and tried to download the pdf file. This however was disliked by the server that spit out the following error code:

Bad Request

Your browser sent a request that this server could not understand.

Size of a request header field exceeds server limit.

This is due to the large number of cookies set by bookcreator. Any suggestions how to bypass this error?

Bypass: Save the book (“Save Selection”), delete all dokuwiki-cookies, log back in and load saved the book. You have lost some cookies and now it might work (depending on no. of pages in your book, though).

All pages are collected and read output by the pdf renderer via a cookie. So the max is the limit of a cookie.

TOC would be great

Bookcreation works realy fine for me, but I have not figured out yet how to get a table of contents into the book

Should be performed in the dw2pdf plugin.

TOC, export of complete namespaces

This is a fine plugin for pdf export. Would be complete for me if a table of content with page numbering was generated at export (f. e. H1 = 1., H2 = 1.1 etc), and also great would be a possibility of exporting complete namespaces at once. Thx for your work.

IE 9 browser issue

I have noticed that on the wiki:ebook page IE 9 and firefox are rendering the page differently. In firefox the “Export selection” and “Save Selection” sections are displaying but in IE 9 that is not the case. Not showing up at all. Any way to fix this issue?

Have other IE9 users this issue too?
plugin/bookcreator/discussion.1405504223.txt.gz · Last modified: 2014-07-16 11:50 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki