trimbox for many page
-
- Member
- Posts: 39
- Joined: Tue Mar 03, 2020 11:28 am
trimbox for many page
I am looking for a solution that can provide me with information about the TrimBox for each page in a multi-page document, as the dimensions may vary between pages.
From what I see, the Switch mechanism using the Stats method only returns the TrimBox for the first page. I’ve tried every solution I could think of, but nothing seems to work.
Does anyone have an idea how to solve this?
Commands:
[Stats.TrimBoxWidth:Path=′/Document[1]/Page[1]',Type=′Effective′] are not working.
From what I see, the Switch mechanism using the Stats method only returns the TrimBox for the first page. I’ve tried every solution I could think of, but nothing seems to work.
Does anyone have an idea how to solve this?
Commands:
[Stats.TrimBoxWidth:Path=′/Document[1]/Page[1]',Type=′Effective′] are not working.
Re: trimbox for many page
Before we go to any solution, can you tell more about the need?
Is it that you want to check that all pages get the same dimensions? Or really report every page dimensions whatever they are?
Is it that you want to check that all pages get the same dimensions? Or really report every page dimensions whatever they are?
-
- Member
- Posts: 39
- Joined: Tue Mar 03, 2020 11:28 am
Re: trimbox for many page
Hie Loric
I would like to report information on the size of the TrimBox for each page.
Of course, I can save this in a preflight report and extract this information from it, but I am looking for a method in which I can read this directly in Switch using the Stats method.
I would like to report information on the size of the TrimBox for each page.
Of course, I can save this in a preflight report and extract this information from it, but I am looking for a method in which I can read this directly in Switch using the Stats method.
Re: trimbox for many page
With scripting module you could do it.
It's easy with a prfelight XML-report and with XSLT you can get what you want.
It's easy with a prfelight XML-report and with XSLT you can get what you want.
Re: trimbox for many page
There is an app for that:
Code: Select all
https://www.enfocus.com/en/appstore/product/fastlane
-
- Member
- Posts: 39
- Joined: Tue Mar 03, 2020 11:28 am
Re: trimbox for many page
Jan. I know.
That's exactly what I did and this xml pulls this data but it requires a script to be written. I thought that there is a simpler method directly in the Switch using the Stats parameters, but I see that it can not be done because the Switch always returns information about the first page of the document and it is not possible with this method to extract information about subsequent pages in a similar way as I showed in the first post, using the corresponding line XLS
That's exactly what I did and this xml pulls this data but it requires a script to be written. I thought that there is a simpler method directly in the Switch using the Stats parameters, but I see that it can not be done because the Switch always returns information about the first page of the document and it is not possible with this method to extract information about subsequent pages in a similar way as I showed in the first post, using the corresponding line XLS
-
- Member
- Posts: 39
- Joined: Tue Mar 03, 2020 11:28 am
Re: trimbox for many page
Sure Freddy, but this requires PitStopServerfreddyp wrote: ↑Thu Jan 16, 2025 9:51 am There is an app for that:Code: Select all
https://www.enfocus.com/en/appstore/product/fastlane
But thank You for the idea
- JimmyHartington
- Advanced member
- Posts: 384
- Joined: Tue Mar 22, 2011 7:38 am
Re: trimbox for many page
I have tried to use AI to create an XLST which can process the XML-report from Pitstop Server.
And it gives a log file which can be renamed to .html and then gives this content:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>TrimBox Information</title>
<style>
table {
width: 50%;
border-collapse: collapse;
margin: 20px auto;
}
th, td {
border: 1px solid black;
padding: 10px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<h1 style="text-align:center;">TrimBox Information</h1>
<table>
<thead>
<tr>
<th>Page</th>
<th>Width (mm)</th>
<th>Height (mm)</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="EnfocusReport/PageBoxInfo/Page">
<xsl:apply-templates select="TrimBox"/>
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="TrimBox">
<tr>
<td><xsl:value-of select="../@index"/></td>
<td><xsl:value-of select="@width"/></td>
<td><xsl:value-of select="@height"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
Re: trimbox for many page
Do you have pdfToolbox. You can do a process plan that check thisKrzysztof Mycek wrote: ↑Thu Jan 16, 2025 9:57 am Sure Freddy, but this requires PitStopServer
But thank You for the idea
-
- Member
- Posts: 39
- Joined: Tue Mar 03, 2020 11:28 am
Re: trimbox for many page
Thank You Freddy.
I used a very similar method but using a callas report and script in Switch.
I used a very similar method but using a callas report and script in Switch.
-
- Member
- Posts: 39
- Joined: Tue Mar 03, 2020 11:28 am
Re: trimbox for many page
Yes Jan. I did it with callas.jan_suhr wrote: ↑Thu Jan 16, 2025 10:03 amDo you have pdfToolbox. You can do a process plan that check thisKrzysztof Mycek wrote: ↑Thu Jan 16, 2025 9:57 am Sure Freddy, but this requires PitStopServer
But thank You for the idea
And it all agrees that this is the way to do it. I was just asking if it could be done more simply. For the future. Unfortunately, I did not find this in the Switch documentation, hence the question here.
Re: trimbox for many page
Hi Jan,
Indeed, that's a possible approach. One that can be even better is to use the FastLane App:
https://www.enfocus.com/en/appstore/pro ... redirect=1

For info, like page boxes, it will be quicker than running a preflight.

And you get FastLane info as metadata:

If you want something less verbose, you can use a specific pattern in the query:

which will result in the following:

Note that in this file, not all pages have a trimbox set. So you only see info when one is found.
Indeed, that's a possible approach. One that can be even better is to use the FastLane App:
https://www.enfocus.com/en/appstore/pro ... redirect=1

For info, like page boxes, it will be quicker than running a preflight.

And you get FastLane info as metadata:

If you want something less verbose, you can use a specific pattern in the query:

which will result in the following:

Note that in this file, not all pages have a trimbox set. So you only see info when one is found.
-
- Member
- Posts: 39
- Joined: Tue Mar 03, 2020 11:28 am
Re: trimbox for many page
Thank You for Your help
Re: trimbox for many page
My answer was sent and I missed that other folks provided similar answers.
still hope it can help.
still hope it can help.
-
- Member
- Posts: 39
- Joined: Tue Mar 03, 2020 11:28 am
Re: trimbox for many page
Yes all answer are useful. Thank You