-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Header/Footer for PDF Export #493
Comments
I would support this request. I was thinking about this the other day when I exported a book. Our current Microsoft Word document template have this and it helps a lot to have this information on a PDF or printed document. |
This would be ideal. Shame we can't currently add the logo or other bits and have the option to remove the 'last edited by' information. Page numbers and a possible optional front cover page would be good too. |
Agree, good request. |
I also support this feature. The feature should have items such as:
|
is there any news on this topic? |
Hey @ssddanbrown - I've pushed a branch ( https://github.com/injektion/BookStack/tree/exportheaders ) which might help with this... For exports, it'll display a page number in the footer and allow users to create a page to include as a header on every page. Most of the juice is in partials/export-header-footer.blade.php which is now included in all the /views/[books|chapters|pages]/export.blade.php and checks for a couple .env variables
There's some extra CSS added to partials/export-styles.blade.php which sets up a counter for pages, and if the .env is true will drop it into a footer div
As for the header, I'm currently letting the user define a page as their header, and then in partials/export-header-footer.blade.php using the slug of that page to import a header....
It's working fine to allow the user to create their own headers, add some page numbering, and export, but I think there's probably a better flow to how to get the user to define the page to use as their header... Do you have any recommendations on where you'd like to see the header get defined, or do you think this will work for those who want it? |
can i with this disable Footer informations in PDF? I don't want author etc. inside of Footer. |
Hey @ssddanbrown, is there any new about this feature? |
Any news on this? It would be much appreciated! |
Any news on this? I also support this feature. Thx. |
There is no news on this upon any additional context within #2311. If there was you'd likely see something here. The only difference since that PR is that we're now probably more DOMPDF focused rather than WKHTMLtoPDF. |
If it helps, I just published a video on using the visual theme system to achieve a footer on PDF exports with the default DomPDF renderer: |
Your video is very helpful - thank you. |
I have found the following after some experimentation:
When I export only one page, both the book title and the page title are displayed, and when I export the entire book, only the book title is displayed. This works for my needs. |
This is the whole content of my /var/www/bookstack/themes/myTemplate/layouts/parts/export-body-start.blade.php file:
To make the function work, add the own template in the /var/www/bookstack/.env file:
|
I know a JavaScript library named paged.js https://pagedjs.org/documentation/ which allow complex headers, footers with page numbers, table of content with page number... |
This Request is opened since 2017. We try BookStack for as our Documentacion system, but without this function it's not functional for us. The Work Around in the youtube video is very nice, but what are the problems when updating to a new version? That looks like it could be problematic... |
We are also using Bookstack as our Documentation system and we use WKHTMLtoPDF for PDF exports thanks to the superior exporting aesthetics; I have seen This Issue That could potentially solve some of the layout issues on DomPDF for us, but branding would be incredibly useful since we want to be able to export policies to provide to customers as part of tender, for example. In my opinion Export Branding would provide a great enhancement of features that would make Bookstack more usable as a business solution. I will take solutions in this issue and other relevant issues into consideration but would love to highlight this feature as something my organisation could really use. |
For our uses, PDF export would need an index with page numbers, and page headers and or footers with current page/numberofpages e.g. Page 5/200 Sadly i cant find any solution to make bookstack work for us. While one can hack in simple page numbers in a header or footer (following the youtube video of bookstack about this), it remains sub-optimal for printed documentations not having an index with page numbers and the maximum number of pages to make sure the document is complete/stays/stayed complete. |
Any news on this feature? This would be so important =( |
I would also like to know how it's going with this issue or better say feature request… |
For Feature Requests
For PDF etc. Export it would be nice to set a global Header/Footer to identify where the file is from etc. Maybe also wih Dynamic Fields like Version / Date / Creator.
The text was updated successfully, but these errors were encountered: