Portrait/ landscape

Hi,

We noted that when you have more than 8 columns the text changes from portrait into landscape view. Although this is nice for part of the text, we would like to define which pages have to be shown in portrait and which should be in landscape. is this somehow possible to do?

Thanks!

Hello @pmoreel,

I’ve added your topic here in Templates, because General isn’t really for these kind of questions :blush:

You’re indeed right: 8 columns or more triggers landscape view, and that is something for now can’t be altered. The reason for it, is that we believe you might export a portrait view with too much on it and it makes for an ugly export.

Do you have examples of templates / exports where this wouldn’t be the case?

Hi sven,

we don’t want pages with more than 8 columns to be shown as portrait view but the pages with only 2 or 3 columns should be in portrait view. is it possible to define part of the tekst as portrait view and another part ( that contains 8 columns or more) as landscape view? now my whole text is shown in landscape view although most of the pages contain only 2 or 3 columns.

Morning @pmoreel,

Is this a text template or not, you want this behaviour?

Hi Sven,

It is indeed a text template that we want to use as an export document. we would like to define that pages with less than 8 columns are in portrait view and the others in landscape. is that possible?

I’m afraid, for now, that’s not possible @pmoreel. We need to adjust some of our back-end code to work the way you want.

We will take this into considaration however; hope you’re not too disappointed by this.

Ok thanks for your quick response.
Hope it will work in the future.

Thanks for your response; if we implemented it, we’ll be sure to let you know in this topic @pmoreel.

Hi @pmoreel,

This now works too for text templates.

So adding {% changeorientation "portrait" %} in the code would work.

Hi Sven,

I am trying to add the code in a text template but the orientation does not change. Has anything changed recently?

Hi @tver,

I ran a couple of tests and it seems to be working as expected for text documents. Could you share with us a bit more information on how are you trying to accomplish this?

Note that the {% changeorientation "portrait" %} or {% changeorientation "landscape" %} tag should be placed in the code of the text template, ideally at the top of it and before the content of the document. It cannot be placed in the Styles code, since there it won’t have any impact on text documents (only useful for accounts or reconciliations templates).

@agustin, according to what Sven has been writing back in September '19 he states that it should be working on a text template (not only account and reconciliation templates). So I tried to add it to a text template on the first row but it stays portrait. Can you conform that it should word on the text template as well?

Sorry @tver, probably I wasn’t clear enough in my previous comment.

I did a couple of tests with Text documents and it was working properly.

If I create a text template with just this code:

{% changeorientation “portrait” %}
This document is going to be portrait

or

{% changeorientation “landscape” %}
This document is going to be landscape

I get the desire output when I generate the export of each of the previous documents. The first one is included in the PDF in portrait while the second one in landscape.

Also it is worth mentioning that this is going to affect only the export PDF, not the input/preview of the template.

Is this how you are trying to do it ? Are you adding {% changeorientation "landscape" %} at the top of your text template and still getting an export PDF in portrait? In that case, if you could share some more information with us to try to identify the issue would be useful (an extract of your code, an example of the export you get)

@agustin, below my code of the text template. I added a new style to have a complete fresh report but is stays portrait. Check our test environment to identify the problem please.

{% changeorientation “landscape” %}

Dit is een test om de pagina in landscape te zetten.

Hi @tver, I found your text template and had a look at it. The issue was in the quotation marks around landscape, where the opening and closing characters were different.

Here is a screenshot. The first line was the code you had while the second line is the one that I added. Silverfin editor’s highlighting could be useful to visualize this type of errors.

Screenshot from 2022-02-07 09-12-34

You will find a new export where the text document is landscape now.

I hope this solves your issue :slight_smile:

@agustin that was the trick indeed. Thanks.