Rotating output files, on output creation


Have a requirement for the output file to be a specific orientation but do not want to compromise the user experience in the editor by having it rotated in the editor? Then we have a MegaScript that you can use that will allow you to rotate your output files during the output creation process.

If you can't find MegaScripts in your Infigo Admin menu under Configuration, please raise a support ticket.



Before you start please note:

You can create a custom MegaScript in MegaScript Management, which you can apply in MegaScript Instances, or you can choose from our the dropdown list within Instances:



How To

Go to Configuration > MegaScripts > MegaScripts Instances

Create a MegaScript Instance and set the configuration for the degrees of rotation you would like to be applied to the output file.

Simply select from the dropdown list the 'Page Rotation' script you just enabled and click 'Create'.

Then give your instance a name of '90 degree output rotation' (depending on how much you want to rotate your output by and ensure the 'Enabled' setting is enabled.

Also ensure the 'Output Creation' setting is enabled too.

Now you need to create a configuration entry for the script depending on how you want your output to be rotated.

Below is the full config but this will need amending depending on how you want your output to be rotated.

pageConfig: "all", //"odd","even","1","3-5"
rotation: {
angle: 90 //0, 90, 180, 270
attributeName: 'name',
attributeValue: 'value'


For example:

pageConfig: "all",
rotation: {
angle: 90,
attributeName: 'Orientation',
attributeValue: 'Portrait'

The example above shows a rotation of 90 degrees on all pages when the attribute Orientation is set to Portrait.

Click Save.


Assign rotation script to a product

Supported product types include: MegaEdit, Infigo Product, Multipart

MegaEdit: Catalogue > Product Types > MegaEdit >MegaEdit Product > Edit > Output MegaScript

Infigo Product: Catalogue > Product Types > Infigo Editor > Infigo Products > Edit > Output MegaScript

Multipart: Catalogue > Product Types > Multi Part Products > Edit > Output MegaScripts


Navigate to your product and when editing it you will see an 'Output MegaScript' drop down. Select your Rotation script from it and save the product.

Have more questions? Submit a request


Please sign in to leave a comment.