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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jph303’s picture

Version: 6.x-1.0-rc1 » 7.x-1.0-rc1

This is also an issue in the 7.x branch as well. Does anyone have any ideas?

candelas’s picture

do you put something on the header or footer?
maybe it is related to http://drupal.org/node/1226980

thtas’s picture

I'm also having this problem with the 6.x-1.0 version

candelas’s picture

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

hunziker’s picture

Status: Active » Postponed (maintainer needs more info)

It can help if you attach your view as a export file.

SnackBucket’s picture

FileSize
6.15 KB

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

candelas’s picture

thanks @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... :)

bofrost’s picture

I have the same Problem it will only work with Format: PDF Table.

bofrost’s picture

I 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:

     // Render and then return
      if (is_object($view) && $key != NULL ) {
        $content = $view->field[$key]->theme($row);
      }

      return;

I changed the stuff in this way:

      if (is_object($view) && $key != NULL ) {
        $content = $view->field[$key]->theme($row);
      }else{
        return;
      }

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!

ltrain’s picture

Having 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?

bofrost’s picture

Status: Postponed (maintainer needs more info) » Needs work

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

ltrain’s picture

Status: Needs work » Postponed (maintainer needs more info)

Right, that works! Thanks.

bofrost’s picture

Here is the patch for this Issue.

bofrost’s picture

Assigned: Unassigned » hunziker
Status: Postponed (maintainer needs more info) » Needs review

Can you please review the patch.

Zuzuesque’s picture

The 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?

bofrost’s picture

This sounds strange... can you attach your file (~/sites/all/modules/views_pdf/views_pdf_template.php) THX

bofrost’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
Quaranta’s picture

The patch in #13 works for me, thanks!

bofrost’s picture

Status: Needs review » Fixed

The patch #13 is applied to the dev version

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Status: Closed (fixed) » Needs work

Even with the patch, any view that uses positioning, either set or by reference, still creates a blank pdf.

Vagabondo’s picture

Status: Needs work » Active

I get the same problem

MichaelCole’s picture

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

killua99’s picture

Assigned: hunziker » Unassigned
Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs steps to reproduce

Dear 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

killua99’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (works as designed)

Please open a new issue if you still have this problem.