I am starting to use this module for the first time on a project (and have another project coming up very soon that will use this as well). It is a very nice module!

I am having some issues though. I have attached a couple of screenshots to hopefully better show what is going on. I am using a table view and the column name (field label name) is showing up next to each table cell value. It seems like there should be a way to hide this somehow, but I have not yet found it. I have tried using Views templates and I can change the value of the field, but the label still shows.

Also, on the second and subsequent pages, the formatting gets a little off (as shown in the second attachment).

Does anyone have some pointers to help me get these issues resolved?

Thanks for this wonderful module. I am looking forward to further development!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

candelas’s picture

i have drupal on spanish, so i translate and maybe the things are not called the same:

labels on all fields: views fields options on a field: first field (label): live this field empty

rows: i havent used, sorry :)

hunziker’s picture

This is a Views PDF 7.x feature that allows to print out the field label. If you disable the field label in the field, this should disappear.

bocaj’s picture

@hunziker: I have tried removing the label, which does work, however it also removes the column header in the table as well. It makes the most sense to me to not have the label show on every field, but for the column to be labeled (if desired). Right now you either get both or nothing.

Zuzuesque’s picture

I found it is a problem with the code, which is easily solved however. I am not sure if it is a bug or not, so not sure if I should submit a bug fix for it not, but for anyone who does wants the lables gone from the table's rows (and not from the table header) you can do the following:

Open views_pdf_template.php and there on line 710 you change

$this->renderRow($x, $y, $row, $bodyOptions, $view, $id);

to

$this->renderRow($x, $y, $row, $bodyOptions, $view, $id, false);

And that should do that trick :)

Not sure about your row smash problems though, I have not experienced that one myself yet. Looking at your picture though it seems as if there was another field/view beneath your table - maybe you did not set its position correctly?

arnested’s picture

Status: Active » Needs review
FileSize
488 bytes

I can confirm that the change described in comment #4 works for me as well.

Patch attached.

Arne

arnested’s picture

Doh!

Same patch as in comment #5 - but this time with extension ".patch" and not ".pdf" ...

Arne

guillaumev’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

Just to confirm that the patch in #6 works...

bofrost’s picture

Status: Reviewed & tested by the community » Closed (fixed)

This sounds logical and looks good for me. I have applied the patch to the actual dev version.

nguyentran’s picture

Thank you for all, that work for me.