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.
Hi,
I use the custom Views PDF version submitted by vegansupreme which includes the PDF Grid fields display.
It works like a charm, except for page breaks ; instead of adding a new page, the content is overlapped on the 1st page.
My view contains a single field (Global -> Custom text with rewritten fields).
I have specified a bottom margin, tried to add a "Page break" field to the view without success.
The last solution gives odd behaviour and the now number specified just does not fit what is displayed.
Enclosed, the resulting PDF file and my view export
Any idea ?
Many thanks in advance.
Comment | File | Size | Author |
---|---|---|---|
#6 | document.pdf | 10.37 KB | misterpo |
cda_2015_etiquettes_bagages.pdf | 8.41 KB | misterpo | |
views_export.txt | 52.25 KB | misterpo |
Comments
Comment #1
vegansupreme CreditAttribution: vegansupreme commented@misterpo Are you using the PDF grid field display in the github repo that I mentioned in #1345182: Positioning Field Output for Columns?
If so, thanks for testing it! Glad it's (almost) working for you! I'll take a look at your views export and see if I can help you get this fixed. You say you've used a bottom margin, have you tried increasing it? Also, changing the minimal space option might work too.
Comment #2
misterpo CreditAttribution: misterpo commentedHi,
Yes, this is the version that I use. It works great with Grid displays.
I have tried both changing the minimal space and the margin bottom without success.
Any idea ?
Comment #3
misterpo CreditAttribution: misterpo commentedHi,
Sorry to insist... Do you have any idea of what can be done ?
Comment #4
vegansupreme CreditAttribution: vegansupreme commentedHi,
I'm trying to duplicate, but I can't exactly match your configuration. The field handler
PDF: Page Break
does seem to have some issues in 7.x-2.x. Have you tried not using a Page break field at all? It should automatically break when the items get to the bottom of the page.Comment #5
misterpo CreditAttribution: misterpo commentedHi,
Thanks for your reply.
Yes, I have tried without any "Page break" field and the result is pretty much the same.
Comment #6
misterpo CreditAttribution: misterpo commentedHi,
Sorry to insist but still stuck to this page break issue.
If I don't use any "Page break" field, rows on the first page are overwritten by rows that should be on the second page.
If I set the "Page break" field to be insterted adter 21 rows on my 7 rowsx3 columns view, it almost work but the last item on the first page is displayed at the bottom of the second page...
Please see PDF attached... and help if possible.
Comment #7
misterpo CreditAttribution: misterpo commentedHi,
I have spent hours to figure out this page break issue... no success.
Please tell me if I should revert to the "official" Views PDF plugin to make it work.
Many thanks in advance.
Comment #8
vegansupreme CreditAttribution: vegansupreme commentedI haven't had any time to develop this branch lately. If you can't get it to work, I'm afraid you may have to use the 1.x branch, though it's more complicated to do layout there. The only other thing I might suggest (maybe you've already done this) is starting with as simple a view as possible—maybe just the title field, and see if the page break works for that layout. If that works, gradually add more complexity. If I recall you had some headers and some rewriting going on? I hadn't tested many complex configurations so there could be some conflict there.
Comment #9
misterpo CreditAttribution: misterpo commentedHi there,
This PDF print functionality from a view is the core of the system I am developing for my customer.
I have many complex views to display as PDF, with Entity Reference fields rewritten in a global custom text field.
Of course, I should supply a robust and reliable system but I would like it also to be simple to configure as I would often have to fine tune it depending on the data provided.
I will give a try to a simple view embedding a single field to understand how it works.
Comment #10
misterpo CreditAttribution: misterpo commentedHi,
Page break field only works with row number set to "1" and field position set to "page".
When I set any other value than "1", page break does not work... really frustrating.
Moreover I get Ajax errors when I modify the PDF Grid settings.
Comment #11
RickJ CreditAttribution: RickJ commented