I have been trying to create a very simple view with views_pdf that takes in the NID as a contextual filter and it doesn't seem to work. I have tried 7.x-1.1 and 7.x-1.x-dev with no luck. If i take off the contextual filter, i get it to work correct. I even tried it as a regular filter and it didn't work.

Comments

bdawg8569’s picture

DOH! I forgot i was working with unpublished content and had a filter to only show published content. My apologies. I'm an idiot. Works fine.

bdawg8569’s picture

Status: Active » Closed (works as designed)

Closing

themic8’s picture

Issue summary: View changes

bdawg8569 are you using one node e.g. http://example.com/print_pdf/234 or multiple http://example.com/print_pdf/1,2,3,4

I am trying to get multple contexual qrguments to work but I don't think it is supported.

vegansupreme’s picture

@themic8, multiple filters and multiple values are supported. The only thing that's tricky about multiple values is sometimes you need to use plus (+) separators and sometimes you need to use comma (,) separators. I just try both and see what works. As long as Configure contextual filter: > More > Allow multiple values is checked it seems to work just fine.

themic8’s picture

vegansupreme,

Thank you for the update.

Where you using the 7.x-1.1 or 7.x-dev?

vegansupreme’s picture

I've tested contextual filters in 7.x-1.3, 1.4 and dev. I'm not sure about 7.x-1.1. but it should be fine. I'm not sure which version I've been using in production, but it's close to 7.x-1.1, or maybe even earlier; with lots of contextual filters and multiple values.

themic8’s picture

Vegansupreme,

Thank you for testing and for the update. I created a new view and not it is working.

kyleheney’s picture

Hi,

I'm having trouble getting Views PDF to work with Contextual Filters.

When I have a Contextual Filter in my view, it will only save a blank PDF to my server. When I remove the Contextual Filter, the PDF is displayed (though it's not what I want it to be since there is no contextual filter).

My View is of Webform Submissions.

My Rule uses "form-id" in the Views Arguments field.

The PDF is saved to the server, but comes up blank when there is a contextual filter.

Any help is appreciated.

Neeraj420’s picture

@kyleheney Were you able to solve this problem, I am also having the same problem

RickJ’s picture

I've just checked this, and contextual filters work as expected, same as any other view type. Views-PDF doesn't do anything directly with contextual filters, they are handled by the main Views architecture.

Contextual filters can be a bit of a bear to get working properly, and the admin UI is not wonderfully intuitive, but I doubt the problem is anything specific to do with Views-PDF.