Skip to content
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

Possibility to import multiple pages as template #139

Open
grempa opened this issue Nov 8, 2019 · 2 comments
Open

Possibility to import multiple pages as template #139

grempa opened this issue Nov 8, 2019 · 2 comments
Assignees

Comments

@grempa
Copy link

grempa commented Nov 8, 2019

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.

@maechler
Copy link
Member

maechler commented Nov 8, 2019

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.

@maechler maechler self-assigned this Nov 8, 2019
@maechler maechler changed the title Lack of information Possibility to import multiple pages as template Nov 8, 2019
@maechler
Copy link
Member

maechler commented Dec 18, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants