Check variable sizes

Post Reply
User avatar
DJS
Member
Posts: 49
Joined: Wed May 01, 2024 11:27 am

Check variable sizes

Post by DJS »

Using Variable Sets.

How do I write the if/or's to check the standard A sizes, I currently have this (and don't understand the "use this string properly"!):
Screenshot 2024-07-08 at 12.57.04.png
Screenshot 2024-07-08 at 12.57.04.png (167.7 KiB) Viewed 25701 times
loicaigon
Advanced member
Posts: 631
Joined: Wed Jul 10, 2013 10:22 am

Re: Check variable sizes

Post by loicaigon »

If your goal is to check for specific dimensions, I am not sure why you need this Ax variable.

If you want to ask for the dimensions in a form of a dropdown with A0, A1…then you may use rule based variables for dimensions:
Ex:
width
if dimension is A1 : 594
else if dimension is A2…

But of course, you would need to repeat for each Ax type.

Another option would be to create as many dimensions checks as Ax type, as individual actions. Then use a boolean rule based variable that you would use in a preflight profile with additional action lists.

But if you only have width/height, then you can simply use them without all that fuzz.

Feel free to clarify.
Loïc Aigon
Enfocus PitStop Manager
User avatar
DJS
Member
Posts: 49
Joined: Wed May 01, 2024 11:27 am

Re: Check variable sizes

Post by DJS »

Thank you for your reply.

My reason for asking is that I am really struggling to create a PPP in Pitstop Pro which draws the information from XML where the information is set by the customer on the splash page (all on the infigo web to print platform - I have no access to their Pitstop server).
Screenshot 2024-07-08 at 13.52.52.png
Screenshot 2024-07-08 at 13.52.52.png (128.38 KiB) Viewed 25685 times
I need a PPP which will check the size/orientation/page extent plus the usual checks to make it print ready (RGB to CMYK etc).

I have the PPP working in a basic form locally but have to write the XML, which is when nothing works... I am desperate to understand how this all works and what I am doing wrong, and the simplest way to do this correctly, I have tried to add the PPP but it is 517kb so wont upload

XML:
<?xml version="1.0" encoding="utf-8"?>
<JobInformation>
<NumberOfPages>{{NumberOfPages}}</NumberOfPages>
<Orientation>{{Orientation}}</Orientation>
<Width>{{Width}}</Width>
<Height>{{Height}}</Height>

VARIABLE SET:
<?xml version="1.0" encoding="UTF-8"?>
<VariableSet xmlns="http://www.enfocus.com/2012/EnfocusVariableSet">
<Version>1</Version>
<Name xml:lang="en-US">CFH</Name>
<Variables>
<Variable>
<Name>NumberOfPages</Name>
<ResultType>Number</ResultType>
<SourceType>com.enfocus.variabletype.externalxml</SourceType>
<SourceVersion>1</SourceVersion>
<OperatorID>1</OperatorID>
</Variable>
<Variable>
<Name>Orientation</Name>
<ResultType>String</ResultType>
<SourceType>com.enfocus.variabletype.externalxml</SourceType>
<SourceVersion>1</SourceVersion>
<OperatorID>4</OperatorID>
</Variable>
<Variable>
<Name>MinLength</Name>
<ResultType>Length</ResultType>
<SourceType>com.enfocus.variabletype.externalxml</SourceType>
<SourceVersion>1</SourceVersion>
<OperatorID>7</OperatorID>
</Variable>
<Variable>
<Name>MaxLength</Name>
<ResultType>Length</ResultType>
<SourceType>com.enfocus.variabletype.externalxml</SourceType>
<SourceVersion>1</SourceVersion>
<OperatorID>10</OperatorID>
</Variable>
<Variable>
<Name>Landscape</Name>
<ResultType>Boolean</ResultType>
<SourceType>com.enfocus.variabletype.rulebased</SourceType>
<SourceVersion>1</SourceVersion>
<OperatorID>13</OperatorID>
</Variable>
<Variable>
<Name>Portrait</Name>
<ResultType>Boolean</ResultType>
<SourceType>com.enfocus.variabletype.rulebased</SourceType>
<SourceVersion>1</SourceVersion>
<OperatorID>20</OperatorID>
</Variable>
</Variables>
<Operators>
<Operator>
<OperatorType>com.enfocus.operator.readfromxml</OperatorType>
<GUID>1</GUID>
<Children>
<OperatorID>2</OperatorID>
<OperatorID>3</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>2</GUID>
<OperatorData>
<Value>ExternalXML</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>3</GUID>
<OperatorData>
<Value>/JobInformation/NumberOfPages</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.readfromxml</OperatorType>
<GUID>4</GUID>
<Children>
<OperatorID>5</OperatorID>
<OperatorID>6</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>5</GUID>
<OperatorData>
<Value>ExternalXML</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>6</GUID>
<OperatorData>
<Value>/JobInformation/Orientation</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.readfromxml</OperatorType>
<GUID>7</GUID>
<Children>
<OperatorID>8</OperatorID>
<OperatorID>9</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>8</GUID>
<OperatorData>
<Value>ExternalXML</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>9</GUID>
<OperatorData>
<Value>/JobInformation/Width</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.readfromxml</OperatorType>
<GUID>10</GUID>
<Children>
<OperatorID>11</OperatorID>
<OperatorID>12</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>11</GUID>
<OperatorData>
<Value>ExternalXML</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>12</GUID>
<OperatorData>
<Value>/JobInformation/Height</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.if</OperatorType>
<GUID>13</GUID>
<Children>
<OperatorID>14</OperatorID>
<OperatorID>18</OperatorID>
<OperatorID>19</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.equals</OperatorType>
<GUID>14</GUID>
<Children>
<OperatorID>15</OperatorID>
<OperatorID>17</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.variable</OperatorType>
<GUID>15</GUID>
<Children>
<OperatorID>16</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>16</GUID>
<OperatorData>
<Value>Orientation</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>17</GUID>
<OperatorData>
<Value>Landscape</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>18</GUID>
<OperatorData>
<Value>true</Value>
<ValueType>Boolean</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>19</GUID>
<OperatorData>
<Value>false</Value>
<ValueType>Boolean</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.if</OperatorType>
<GUID>20</GUID>
<Children>
<OperatorID>21</OperatorID>
<OperatorID>25</OperatorID>
<OperatorID>26</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.equals</OperatorType>
<GUID>21</GUID>
<Children>
<OperatorID>22</OperatorID>
<OperatorID>24</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.variable</OperatorType>
<GUID>22</GUID>
<Children>
<OperatorID>23</OperatorID>
</Children>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>23</GUID>
<OperatorData>
<Value>Orientation</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>24</GUID>
<OperatorData>
<Value>Portrait</Value>
<ValueType>String</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>25</GUID>
<OperatorData>
<Value>true</Value>
<ValueType>Boolean</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
<Operator>
<OperatorType>com.enfocus.operator.constant</OperatorType>
<GUID>26</GUID>
<OperatorData>
<Value>false</Value>
<ValueType>Boolean</ValueType>
</OperatorData>
<OperatorVersion>1</OperatorVersion>
</Operator>
</Operators>
</VariableSet>

JOB TICKET XML:
<?xml version="1.0" encoding="utf-8"?>
<JobInformation>
<NumberOfPages>{{NumberOfPages}}</NumberOfPages>
<Orientation>{{Orientation}}</Orientation>
<Width>{{Width}}</Width>
<Height>{{Height}}</Height>
loicaigon
Advanced member
Posts: 631
Joined: Wed Jul 10, 2013 10:22 am

Re: Check variable sizes

Post by loicaigon »

Ok, first your XML is malformed but that might be a copy/paste issue.

However and just in case, please ensure that your XML is properly formed:

Code: Select all

JOB TICKET XML:
<?xml version="1.0" encoding="utf-8"?>
<JobInformation>
<NumberOfPages>{{NumberOfPages}}</NumberOfPages>
<Orientation>{{Orientation}}</Orientation>
<Width>{{Width}}</Width>
<Height>{{Height}}</Height>
</JobInformation>
What I would suggest here is to create 2 action lists:
  • One that checks for Portrait
  • One that checks for Landscape
Then have a preflight profile where you add the two checks (your Action Lists from above)
Then condition their execution (enable variable names) with your Portrait or Landscape variable.

With all of that, you should get it working.
Loic
Loïc Aigon
Enfocus PitStop Manager
User avatar
DJS
Member
Posts: 49
Joined: Wed May 01, 2024 11:27 am

Re: Check variable sizes

Post by DJS »

thank you so much, will give it a go :)
User avatar
DJS
Member
Posts: 49
Joined: Wed May 01, 2024 11:27 am

Re: Check variable sizes

Post by DJS »

Thank you for your assistance Loic, Sorry, I have searched the forums and enfocus learning, I need to recreate the variable preferences as I don't have access to the host server , might you have something available to show me how I should populate this?
Screenshot 2024-07-10 at 08.29.54.png
Screenshot 2024-07-10 at 08.29.54.png (99.72 KiB) Viewed 25609 times
loicaigon
Advanced member
Posts: 631
Joined: Wed Jul 10, 2013 10:22 am

Re: Check variable sizes

Post by loicaigon »

Hi,

Will the PDF be processed in a Switch flow?

Loic
Loïc Aigon
Enfocus PitStop Manager
User avatar
DJS
Member
Posts: 49
Joined: Wed May 01, 2024 11:27 am

Re: Check variable sizes

Post by DJS »

The PDF will be processed online (Infigo web to print) via their PitStop Server 2023.
loicaigon
Advanced member
Posts: 631
Joined: Wed Jul 10, 2013 10:22 am

Re: Check variable sizes

Post by loicaigon »

Ok, I am not familiar enough with Infigo products, nor if they provide setup assistance. So I can only speak from an external point of view.

If you only have access to PitStop Pro, you cannot point to a XML Job Ticket. You need The PitStop Server Desktop app for that because variables would refer to a job ticket:

Image

Then you could fill parameters as they seem to require: https://infigosoftware.zendesk.com/hc/e ... t-Profiles

Right now, you either need a PitStop Server Developer License or simply run a trial. Unless, of course, Infigo can help you setting this up.

Loic
Loïc Aigon
Enfocus PitStop Manager
User avatar
DJS
Member
Posts: 49
Joined: Wed May 01, 2024 11:27 am

Re: Check variable sizes

Post by DJS »

Thanks again for your help and assistance
User avatar
DJS
Member
Posts: 49
Joined: Wed May 01, 2024 11:27 am

Check variable sizes against manual input/xml value

Post by DJS »

Hello again,

Struggling with something slightly different

Information input in a smart preflight or from XML is a page size (ie A3/A4/A6 etc). I would like to pass if the selected size matches the PDF, fail if not

Would this need a rule based or text based variable? and how might that look?
Post Reply