I'm working on a project which uses quite large images needing to be printed in A3 Landscape opposed to A4 Portrait.
I've isolated the content types and wish to implement a hook or feature which rotates and resizes the "image" content type to A3 Landscape.

Would anybody have any idea how to do this? It seems like a valuable feature in my position.

Comments

vegansupreme’s picture

Are you looking to rotate the entire page or just the images? Do the two content types use the same field for the image? If you're using two different fields, you could probably just use image styles and rewriting in your view.

I'm looking into adding a hook (or multiple hooks) in the 2.x version to allow for custom layout/styling in a safe way; but it's been slow going lately. Any patches are greatly appreciated!

fubarhouse’s picture

It would be the page, image styles aren't applicable to me for this.
The images are landscaped, highly detailed and A3 size, where as it just looks stupid putting the content in such a format.

It does unfortunately require custom code, but I figured somebody may have done it previously - who can share some insight.

fubarhouse’s picture

Vegan Supreme,

I've managed to programmably get this to work (line 98 of views_pdf_plugin_display.inc), but the module isn't recognising views' $row variable as expected.
If we can manage to identify the row variable, I could look into something more permanent.

The issue below is that when it's active, all rows will assume that they are of the content type "figure".
Changing = to == simply doen't affect the output (default).

    if ($row->node_type = 'figure') {
      $orientation = 'L';
      $format = 'A3';
    }
killua99’s picture

@fubarhouse can you attach a PDF example to see how it looks.

How this could be the best solution, a page settings? or a content type settings? Sound logic a page settings to me, but I don't know, maybe someone is using it with different style.

fubarhouse’s picture

Killua99,

In this instance, it would be per content type, as the figure content type hosts the image field.
The whole project is rather sensitive but you can find a similar document on last years release (below):

The PDF is to be purely content driven, and a lot of different documents have different lengths and the specific page number can't be matched to the orientation or format, alternatively it could be a field setting, but I don't believe it's worth the drama.

killua99’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

And well this is ...

Your PDF is like:

+----+
|
| A
+----+
|
| C
+----+
|
| A
+----+

Where C need to be Landskape?

killua99’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)