Comments (8)
I think @macjohnny is proposing a feature similar to this:
<pdf:document>
<pdf:header>
<pdf:text>Some headline text: {yourVariable}</pdf:text>
</pdf:header>
<pdf:footer>
<pdf:text>Footer, we are on page {currentPage}</pdf:text>
</pdf:footer>
<pdf:page>
<pdf:header>Maybe we can overwrite header and footer on pages?</pdf:header>
</pdf:page>
</pdf:document>
It should be possible to define header and footer on document level. Probably there should also be the possibility to overwrite header and footer on page level and variables like {currentPage}
should be provided. In this scenario you could use dynamic data from your model.
I am not sure however how this feature could be implemented. Maybe it is possible to store a reference to e.g. HeaderViewHelper
and then render its children on each page with a new set of variables like {currentPage}
.
from pdfviewhelpers.
That would be great! I would sponsor €100 for something like this.
from pdfviewhelpers.
I started progress on this one and created a working example: bb942c3
https://github.com/bithost-gmbh/pdfviewhelpers/tree/feature/headerFooterSupport
It seems to be easier than expected, although it still needs some effort until it is ready to be used.
from pdfviewhelpers.
@Gernott I just released pdfviewhelpers
v2
, it contains header and footer ViewHelpers and lots of other features. If you still feel like sponsoring, a contribution would be very welcome!
See https://github.com/bithost-gmbh/pdfviewhelpers#support-development
from pdfviewhelpers.
Currently, it is necessary to extend the class defined in plugin.tx_pdfviewhelpers.settings.config.class
, overwrite the Header()
or Footer()
method or both and set the custom class in plugin.tx_pdfviewhelpers.settings.config.class
The Header()
and Footer()
methods are called for every new page added.
from pdfviewhelpers.
See the example in https://github.com/bithost-gmbh/pdfviewhelpers/blob/master/Classes/Model/BithostTCPDF.php#L42
from pdfviewhelpers.
I think this solution only works if you have a static header and footer. but what if you want to add dynamic data like data from your model?
from pdfviewhelpers.
This is implemented and tested in the current develop
branch and will be released as part of pdfviewhelpers
v2
.
from pdfviewhelpers.
Related Issues (20)
- Undefined array key warning on PHP 8.0
- Tables unexpected gap HOT 2
- System requirements? HOT 2
- PDF/UA Support HOT 5
- How to get content into pdf? HOT 2
- <style> tag not possible in <pdf:html> HOT 3
- Image viewhelper do not accept FileReference HOT 1
- Autocomplete for Viewhelpers? HOT 6
- Problems with character conversion for languages e.g Polish, Hungarian etc. HOT 10
- PHP 8 errors in AbstractTextViewHelper when text is empty and trim or removeDoubleWhitespace is set to 1 HOT 1
- PHP 8 error in ColumnViewHelper if width isn't set HOT 2
- Shouldn't/couldn't an image (in general and) in the header be embedded in a PDF as a reference - to save memory? HOT 2
- Error in ImageViewHelper with php8.1 HOT 2
- ViewHelper to attach another PDF HOT 1
- TYPO3 12, non-composer: Fpdi not found HOT 2
- Compatibility issues with News Extension version 11.1.1 HOT 3
- Undefined array key error in ImageViewHelper HOT 1
- Support TYPO3 v12.4 LTS HOT 2
- processingInstructions, no File in fileadmin/_processed_ generated HOT 7
- Use in controller HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfviewhelpers.