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.
I created a view with 2 fields and a PDF template. It works fine if I use the table view. However when I switch to unformatted I get a blank page and no pdf is generated.
I have tried with and without the template, and I've used all sorts of Row Style settings. I also get the same result with the dev version.
Any advice?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#13 | blank_page_with_unformatted_style-1235906.patch | 527 bytes | bofrost |
#6 | pdf_view.txt | 6.15 KB | SnackBucket |
Comments
Comment #1
jph303 CreditAttribution: jph303 commentedThis is also an issue in the 7.x branch as well. Does anyone have any ideas?
Comment #2
candelas CreditAttribution: candelas commenteddo you put something on the header or footer?
maybe it is related to http://drupal.org/node/1226980
Comment #3
thtas CreditAttribution: thtas commentedI'm also having this problem with the 6.x-1.0 version
Comment #4
candelas CreditAttribution: candelas commented@thtas, can you explain a little more about what are you using?
do you have a field that is in two different pages?
do you use unformatted style?
do you put anything in the header or the footer?
Comment #5
hunziker CreditAttribution: hunziker commentedIt can help if you attach your view as a export file.
Comment #6
SnackBucket CreditAttribution: SnackBucket commentedI was able to resolve the issue by starting with a fresh install and recreating the view. No idea why.
I've attached my view. As near as I can tell it is exactly the same as when it was giving me problems.
Comment #7
candelas CreditAttribution: candelas commentedthanks @SnackBucket
i see that any of your fields are in header and footer.
could you please check what happens if you put a simple field in the header, like the number of the page offered by this module?
i am trying to debug a problem that i have with headers and footers... :)
Comment #8
bofrost CreditAttribution: bofrost commentedI have the same Problem it will only work with Format: PDF Table.
Comment #9
bofrost CreditAttribution: bofrost commentedI found something strange in the views_pdf_template.php line 368 - 372.
There is a return wich breaks the rendering. I guess it should not look like:
I changed the stuff in this way:
I build no patch in the fact, that I have not the complete overview of the module code and can't assure that my solution is right... but still it works!
Comment #10
ltrainHaving the same problem.
@Drupaldise, I tried your solution and I got output in PDF Unformatted, but the output from the fields in the view displayed on top of each other. So I just had a garbled mess at the top of the PDF.
Does anyone else have ideas?
Comment #11
bofrost CreditAttribution: bofrost commentedI had the same problem, but than I realized that I have to that X and Y Values for all my Fields in the Field Settings.
(This is also a great opportunity to style your Document totally free.)
I do not know it this should be done in this way but I can live with this solution.
Comment #12
ltrainRight, that works! Thanks.
Comment #13
bofrost CreditAttribution: bofrost commentedHere is the patch for this Issue.
Comment #14
bofrost CreditAttribution: bofrost commentedCan you please review the patch.
Comment #15
Zuzuesque CreditAttribution: Zuzuesque commentedThe patch, or better the execution of code following behind the patch, results in an error for me now: Parse error: syntax error, unexpected T_PROTECTED in ~/sites/all/modules/views_pdf/views_pdf_template.php on line 380
I applied the code to the newest dev version from the 15th December.
Edit: The unformated style used to work for me some months ago on another installation. I don't have a copy of that one anymore, but it would seem the code of the rc I used back then contains the same 'error' this patch tries to fix. Not sure if that helps?
Comment #16
bofrost CreditAttribution: bofrost commentedThis sounds strange... can you attach your file (~/sites/all/modules/views_pdf/views_pdf_template.php) THX
Comment #17
bofrost CreditAttribution: bofrost commentedComment #18
Quaranta CreditAttribution: Quaranta commentedThe patch in #13 works for me, thanks!
Comment #19
bofrost CreditAttribution: bofrost commentedThe patch #13 is applied to the dev version
Comment #21
Anonymous (not verified) CreditAttribution: Anonymous commentedEven with the patch, any view that uses positioning, either set or by reference, still creates a blank pdf.
Comment #22
Vagabondo CreditAttribution: Vagabondo commentedI get the same problem
Comment #23
MichaelCole CreditAttribution: MichaelCole commentedI had this problem, switched to "PDF Table", got a rendering issue re: an image in the fields. Removed the image and it worked. This may happen from several issues. This was on a D6 site.
Comment #24
killua99 CreditAttribution: killua99 commentedDear fellow Drupal enthusiasts,
I have set this issue to "Postponed (Maintainer needs more information)".
If not already done please add an issue summary and steps how to reproduce the problem.
And please read again, "Making an issue report".
Help about how to do this can be found on IRC and in the user groups.
After there is new information, please re-open the issue by changing the status to active.
--
This issue was edited with the help of Issue Helper
Comment #25
killua99 CreditAttribution: killua99 commentedPlease open a new issue if you still have this problem.