Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Use case:
I've created a view, showing all (fields of) nodes of a certain content type. I want every node on a new pdf-page, but I can't figure out how to get it right. I've browsed the issue queue and the documentation page without any luck.
I've tried using a Page Brake, but that also doesn't give the results I want (the content of the next page then doesn't start at the top).
What is the right way to accomplish this?
Thanks,
Mike.
Comment | File | Size | Author |
---|---|---|---|
#10 | 2190971-10-start-adding-content-at-page-1.patch | 1.93 KB | emattias |
Comments
Comment #1
Daguntzi CreditAttribution: Daguntzi commentedSame problem...
Comment #2
Daguntzi CreditAttribution: Daguntzi commentedSorry, I didn't see this in the documentation..
9. To add a page break, you can add a PDF page break field. When this field is rendered new page is added. Reorder the fields if necessary.
Comment #3
sportel CreditAttribution: sportel commented@Daguntzi,
I know of the page break field. But when I add this, the content of every next page start a little further down, and not nicely at the top of the page like the first one. That's the reason for this issue.
Mike.
Comment #4
milos.kroulik CreditAttribution: milos.kroulik commentedPlease use more meaningful issue title.
Comment #5
Daguntzi CreditAttribution: Daguntzi commentedI see what you mean, sportel.
I did the trick changing the bottom margin in the PDF Page Settings with no page break.
Comment #6
vegansupreme CreditAttribution: vegansupreme commentedSportel,
Are your position settings set to: position relative to Page?
Comment #7
sportel CreditAttribution: sportel commented@vegansupreme,
No, I've got all fields set to: relative to last writing position. Shouldn't it be?
Comment #8
vegansupreme CreditAttribution: vegansupreme commentedTry relative to page. 'Relative to last position' should put the next field after the previous one, and offset it by the amount in the X and Y fields—this is great if you want several rows on the same page. Whereas relative to page will give you absolute position on the page.
Comment #9
emattias CreditAttribution: emattias commentedI needed to add content to only the first page of a 2 page template. Unfortunately it was added to the second page.
This patch changes the behaviour so that it starts adding to the first page. I haven't tested any other scenarios, but it solved my problem. :)
Comment #10
emattias CreditAttribution: emattias commentedApparently my new git diff settings mangled the patch. Here's the #9 patch, non-mangled. :)
Comment #11
killua99 CreditAttribution: killua99 commentedHi @emattias
This patch is for the 1.x-dev version? or 1.3?
Comment #12
emattias CreditAttribution: emattias commentedThe patch is against the latest 1.x dev. Which is the same as 1.3 (at time of writing) :)
Comment #13
killua99 CreditAttribution: killua99 commentedThanks to clarify it.
I'll try to take a look this afternoon ... someone know how to open a spacetime bridge? need 42h daytime and no needed to sleep :/
Comment #14
killua99 CreditAttribution: killua99 commentedThis need kind reroll and review.
@vegansupreme can you take a look when you can thanks
Comment #15
vegansupreme CreditAttribution: vegansupreme commentedI'm confused. I thought the original issue (support request) was about the position of content shifting down with each page.
No mention was made in the original post about template files.
@sportel, can you let us know if you've solved your problem and if so how?
@emattias, I'm sorry, but I'm confused about this patch. This patch is supposed to add content to the first page of a 2 page PDF template? This seems to be default behavior of Views PDF already. Please clarify the problem, as I am unable to reproduce.
Comment #16
killua99 CreditAttribution: killua99 commentedSo to reorder this issue.
If the patch doesn't have any direct relation with this issue, then we need to split this topic, and attend in a diff one the patch.
Please @sportel @emattias need feed back.
Comment #17
sportel CreditAttribution: sportel commentedSorry for this late response.
Yes, I've solved the original problem with comment #6 (thanks @vegansupreme).
But now I run into this problem: https://drupal.org/node/2158405
So, if everybody agrees, this topic could be set to "solved".
Thanks again.
Mike.
Comment #18
killua99 CreditAttribution: killua99 commentedSo .... fixed.
Open a new issue if you want continue solving the patch.