First off thanks for this great module!

I'm just having a couple of issues- hopefully something I've missed.

1. I can't seem to get my .css files to take. I've specified the path as /sites/all/themename/css/myfile.css as well as sites/all/themename/css/myfile.css (with and without leading slash). Neither seem to work. But perhaps my approach is wrong? I'm inspecting and finding the regular div names that I'd style for html and testing with display:none; to see if anything takes on the pdf display. Nothing has worked so far.

2. Second issue is that the pdf pages are all coming out without any spacing between the words.

Comments

mattsmith3’s picture

Found this issue on stackoverflow: http://stackoverflow.com/questions/4063302/pdf-format-word-spacing which inspired me to try changing the font, which took care of the word spacing. Still, no luck with the css file.

gillarf’s picture

did you ever work out how to use the css file? I'm having the same issue.

darrellduane’s picture

I haven't tried it yet, but the helper text says URL. Yes, /sites... should work, but have you tried specifying the full URL including domain name ? Or some other form?
Also I assume you've got your fields configured to be Render as HTML.
I am guessing that there is some issue with the div names that you're using, I hope we figure this out.

gillarf’s picture

Thanks Darrell - I did work it out - just don't use the forward slash.

So path begins sites/all...

Not a lot of CSS is available - I have ended up editing views template files to get the right output i was after.

darrellduane’s picture

I'm surprised to hear that Views Template files work for this. Do you have any tips or experience for this? When I go to the Theme Information link I see that the three files views-pdf.tpl.php, views-pdf-unformatted.tpl.php, views-pdf-fields.tpl.php are missing, were they missing for you?

gillarf’s picture

I am including views using the include view 'field', and have found I can use view templates for those included views.

So for example, one of those views includes a 'photos' field which allows multiple entries. When the photos had a separator, they were not rendering on the PDF nicely, so I used the views-view-field--[view-name]--default--field[fieldname].tpl.php template to make the photos render nicely.

Also, I have had to remove any standard formatting of fields in views to prevent complicated HTML (caused by nested divs).

mattsmith3’s picture

Sorry to say that I ended up doing a custom solution loading html into a dompdf function in a php script and stopped using this module all together.

darrellduane’s picture

I'm now looking into jQuery PrintArea to solve the issue I've been trying to solve with ViewsPDF.

simon georges’s picture

Status: Active » Closed (won't fix)

I apologize, the 6.x version is not maintained any more. This issue is close for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.