variable safe type margin depending on page count

Post Reply
dcardillo
Newbie
Posts: 13
Joined: Fri Jan 06, 2023 9:24 pm

variable safe type margin depending on page count

Post by dcardillo »

Hello,

I'm trying to create a preflight that will check the safe type margins, but the Inner margin offset changes depending on the total page count.

I've tried creating Restrictions depending on the page range — for example "Select page range 501-" — to limit which margin checks are used (e.g. under 500pgs the check will not run), but due to the restriction, it _only_ runs on that range, not the pages before, which it also needs to check (with that same margin, for that page count).

I'm not seeing any IF/THEN logic, and I can't figure out a way with AND, OR and NOT to get it to work right.

For example:

Select page range: 1-700
Check page safe type zone

...works on pgs 1-700

and:

Select page range: 701-
Check page safe type zone

...works on pgs 701+

but:

Select page range: 1-700
Select page range: 701-
AND
Check page safe type zone

...returns nothing, "No errors found" (even when there should have been)

What I'm looking for is:

IF page count is [in this range]
Check page safe type zone [with these options]

Thanks in advance.
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: variable safe type margin depending on page count

Post by freddyp »

The principle of Actions that make changes or check things is that they act on what is selected. There is no need for an IF/THEN logic because it is implicit: if nothing is selected nothing happens, you do not have to specify that explicitly.

Select page range 1-700
Select page range 701--
AND

selects pages that are in the range 1-700 AND that are in the range 701-. Of course no such page exists, so nothing is selected, so nothing is changed/checked. What you need to do, and in fact you have already figured that out, but you have not taken the next step, is to use multiple sets of Select/Check in one and the same Action List:

Select page range 1-700
Check page safe type zone with one set of parameters
Select page range 701-
Check page safe type zone with another set of parameters
Select page range etc.
...
dcardillo
Newbie
Posts: 13
Joined: Fri Jan 06, 2023 9:24 pm

Re: variable safe type margin depending on page count

Post by dcardillo »

selects pages that are in the range 1-700 AND that are in the range 701-. Of course no such page exists
yeah, this is what I'd surmised after a time. Thanks for confirming.

Is there a way to make a selection, and then add to that selection? I've experimented with making a selection, saving it, and then loading that selection again, but it doesn't add to the current one.
use multiple sets of Select/Check in one and the same Action List
I've gone down that route, but it's not working for our requirements.

That is, the Inside margin doesn't change from the beginning of the book to the end (e.g. the first 100 pages with one gutter, the last 100 with another).

The inside margin is different depending on the total page count.

So, for a 150pg book, the inside margin is .375", but for a 701pg book it's .875". What I need is something that checks the first 50 pages of both books, with different margins, depending on the book's length.

In your example, selecting pgs 1-700, checking, selecting 701-, checking, a 150pg book would get checked at the 701pg spec. (And it would fail, in this case, with a smaller gutter.)

What I've been trying, with Restrictions, is to select for and against titles with specific page ranges.

Selecting pgs 701+ will fail on 150pgs, so the check won't run.

It will run on pgs 701-750 — but only on those pages, due to the restriction. I also need it to check the rest of the book with that spec.

I've been able to do this with variables: setting a gutter width depending on the total page count. But this still requires a manual input, as I don't have a way of polling the PDF to get this info.

This needs to be hands-off, processing hundreds of files at a time, with the only human intervention counting the number of files that failed and generating a report.
dcardillo
Newbie
Posts: 13
Joined: Fri Jan 06, 2023 9:24 pm

Re: variable safe type margin depending on page count

Post by dcardillo »

can one stack NOT arguments? Does NOT work on more than one line?

For example:

Selection 1 -- the first criterion to select for
Selection 2 -- the next criterion
NOT -- selecting everything that is not in the first 2 criteria
NOT -- again, unselecting all that and re-selecting everything from the first 2 groups?

Or can you do:

Selection 1
NOT
Selection 2
NOT
AND

??
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: variable safe type margin depending on page count

Post by freddyp »

You posted this in the PitStop Pro section of the forum. That is understandable and fine. But it is supposed to be hands-off, so may I assume you have PitStop Server?

In that case in the Variable Set you define a variable "NrOfPages" as a number using the variable [Stats.NumberOfPages], and a "Gutter" variable as a length and as a rule-based variable.
Screen Shot 2023-01-10 at 17.54.54.png
Screen Shot 2023-01-10 at 17.54.54.png (237.31 KiB) Viewed 942 times
The value is in pt, but when typing the value you can type it as 0.375in and it will get converted. In the Action List or the Preflight Profile you can use the Gutter variable and it will be dynamically adapt to the number of pages.
dcardillo
Newbie
Posts: 13
Joined: Fri Jan 06, 2023 9:24 pm

Re: variable safe type margin depending on page count

Post by dcardillo »

I apologize if there are hard rules about what gets posted in which forum. I'm developing this preflight locally on the desktop, and some of the people who will run it will also be using it on the desktop. We also want to batch-process files received, and will also be putting it on Pitstop Server.

As for what Pitstop can and cannot select for and against, I would be pleased to find out if Pitstop Server can do more (like filter files in a hotfolder by page range). If so I can move this conversation there.

What you've described is almost exactly what I have:

Image
Image

This still required a manual input of the page range.

It gets used in the Action here:

Image

What I'm looking for is some logical operators that do:

Select pg 701
(if pass)
Select all pages
Run check 1
(if fail)
Select pg 501
(if pass)
Select all pages
Run check 2
(if fail)
Select pg 301
(etc)

and all without someone having to tell Pitstop what page range to check against.

[Edit: image URLs]
Last edited by dcardillo on Tue Jan 17, 2023 11:17 pm, edited 2 times in total.
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: variable safe type margin depending on page count

Post by freddyp »

It is not that there are hard rules, you did fine, it is just that a choice of solution can depend on whether it has to be pure PitStop Pro or whether it can be PitStop Server.

The images in your last post do not show so there is nothing I can say about that.

Let us step back to the problem statement. If I understand it correctly from your original post the inner margin offset value in the safe type zone check depends on the page count and that inner margin offset value is fixed for the whole document, right? If the answer is yes, then my previous reply is the answer to the problem, but it will only work in PitStop Server.
dcardillo
Newbie
Posts: 13
Joined: Fri Jan 06, 2023 9:24 pm

Re: variable safe type margin depending on page count

Post by dcardillo »

I finally got it to work.

It may have been my own unfamiliarity with the program, but I couldn't find anything that references it in the documentation. (And all of the forum posts I've read suggest it's not possible.)

I had been doing what you suggested: select page ranges with an Action. I couldn't get the logic to work.

What I did:

Select all
Select by number of pages: less than or equal to [upper limit of range]
Select by number of pages: more than or equal to [lower limit of range]
AND
Check page safe type zone
[repeat for each range]

"Select by number of pages" is under "Select pages" and the option for "by number of pages" was probably staring me right in the face and/or I couldn't figure out how to make proper use of it.
Post Reply