Hi,

I have set up Views PDF and gets an PDF outputed on the correct url.
However, I like to style this PDF, but it seems like there are no documentation at all.
Anyone who can help?

My view outputs node title, cck image field and the node body.
I like to set it up for landscape (done).
Showing the title in the entire document width.
Showing an image below the title (the images has different sizes and aspects).
Show the body (if any) below the image.

At the moment, everything is printed on-top of each other.

Anywhere that I can find a styling/theming guide to the Views PDF module?

Comments

candelas’s picture

if you go to basic options on Views, 2nd element: you choose the type of format and 3rd element: you have the options for dessing (relation among fields for them no to be one on top the other, color, font size, etc).
i hope it helps :)
also in issues, you have tips and the documentation page
http://drupal.org/node/1086584

findorf’s picture

Thanks, I got the basic styling running.

But I like to do some extra (can I center a image field on the page?).

When editing the views pdf display, I can click the Theme: Information link, and it loads a page displaying the php template files that are possible to use.

Adding a new file, clicking "Rescan template files", I get the new file marked in bold.
If I edit this new file and add some text or php code to it, it does not show up anywhere...

Can I not do some extra markup or php coding for the pdf?

My current need is to load a node for each pdf (from the URL argument) and print the title and body text at the first page of the pdf.
Also, can I add a page break for every second views row?

hunziker’s picture

As I wrote else where you could not use template files with this module. You need to do the styling via CSS (see for that the TCPDF project) or via PHP and the API of TCPDF.

nguyentran’s picture

hi,
You mean that put some code PHP in 'Render Settings', is there any simple example to put code in this. (use variable and function). Thank a lot

s.daniel’s picture

Status: Active » Fixed

I have added a little sample in the documentation: http://drupal.org/node/1086584

$content = strtoupper($content);

Status: Fixed » Closed (fixed)

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