Open grempa opened 4 years ago
This is currently not possible, but a workaround could be to use a for loop like this:
<f:for each="{0:1, 1:2, 2:3, 3:4}" as="pageNumber">
<pdf:page importPage="{pageNumber}" ></pdf:page>
</f:for>
If we add such a feature, it would probably also be helpful to be able to provide more than one sourceFile
. We could reuse the PageViewHelper
or create a new one:
<pdf:importPages pages="all" sourceFile="path/to/file.pdf" />
<pdf:importPages pages="1" sourceFile="path/to/file.pdf" />
<pdf:importPages pages="1,2,4" sourceFile="path/to/file.pdf" />
<pdf:importPages pages="2-3" sourceFile="path/to/file.pdf" />
We would probably also have to account for different page sizes in the source PDF.
@grempa There is now a ViewHelper to attach a complete PDF file:
<pdf:document>
<pdf:attachPdf path="EXT:pdfviewhelpers/Resources/Public/Examples/ExtendExistingPDFs/pdf_template.pdf" />
</pdf:document>
I will change this to an improvement to maybe rework and extend the API of that ViewHelper.
I miss one big feature.
Add possibility to import whole sourceFile and not just a single page. Maybe something like:
<pdf:page importPage="all" ...>...</pdf:page>
This would become really useful, as i want to have a base pdf which is then added some pages to.