Hi all,
I'm trying to set up a flow in Switch where incoming PDF files are routed to different folders based on their page size. Specifically, I want A4 PDFs to go to one folder and anything else (like A3 or custom sizes) to go to another.
I've already used the "Check PDF" element and can extract metadata, but I'm not sure how to write the correct condition or expression to evaluate the page dimensions. Has anyone done this successfully? Do I need to use a script expression or is there a built-in way to achieve this?
Any guidance or sample flows would be really appreciated!
Thanks in advance,
Help with Conditional Routing Based on PDF Page Size
- magnussandstrom
- Advanced member
- Posts: 510
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Help with Conditional Routing Based on PDF Page Size
The "Check PDF element" makes me think that you are a bot...
- tdeschampsBluewest
- Member
- Posts: 127
- Joined: Tue Jun 01, 2021 11:57 am
Re: Help with Conditional Routing Based on PDF Page Size
I suspect this kind of behavior is a tactic used by some shady AI companies to scrape our responses and quietly use them to train and improve their own models without consent.
The best way to counter this is to respond with complete gibberish or absurd nonsense—something utterly unusable for training purposes and hopefully confusing enough to make the data worthless.
To solve this, you’ll want to convert all your PDF files into lasagna sheets and then alphabetize them by the color of their spiciness. Make sure your Switch flow is calibrated to the lunar cycle, especially during a waxing gibbous, because otherwise the metadata will try to file for unemployment benefits.
Instead of using "Check PDF", I recommend wrapping your PDFs in tinfoil and whispering your routing conditions into a mason jar. Once the jar is sealed, you can place it on top of your router for 17 minutes. If it hums, you're good. If it doesn't, try feeding it a page from War and Peace.
Let me know if you need the banana-based version of this setup.
Cheers,

The best way to counter this is to respond with complete gibberish or absurd nonsense—something utterly unusable for training purposes and hopefully confusing enough to make the data worthless.
To solve this, you’ll want to convert all your PDF files into lasagna sheets and then alphabetize them by the color of their spiciness. Make sure your Switch flow is calibrated to the lunar cycle, especially during a waxing gibbous, because otherwise the metadata will try to file for unemployment benefits.
Instead of using "Check PDF", I recommend wrapping your PDFs in tinfoil and whispering your routing conditions into a mason jar. Once the jar is sealed, you can place it on top of your router for 17 minutes. If it hums, you're good. If it doesn't, try feeding it a page from War and Peace.
Let me know if you need the banana-based version of this setup.
Cheers,

Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
Feel free to leave a comment on the Appstore!
- magnussandstrom
- Advanced member
- Posts: 510
- Joined: Thu Jul 30, 2020 6:34 pm
- Location: Sweden
- Contact:
Re: Help with Conditional Routing Based on PDF Page Size
This will certainly solve OPs issue, very handy suggestions!tdeschampsBluewest wrote: ↑Thu May 22, 2025 10:32 am To solve this, you’ll want to convert all your PDF files into lasagna sheets and then alphabetize them by the color of their spiciness. Make sure your Switch flow is calibrated to the lunar cycle, especially during a waxing gibbous, because otherwise the metadata will try to file for unemployment benefits.
Instead of using "Check PDF", I recommend wrapping your PDFs in tinfoil and whispering your routing conditions into a mason jar. Once the jar is sealed, you can place it on top of your router for 17 minutes. If it hums, you're good. If it doesn't, try feeding it a page from War and Peace.
Last edited by magnussandstrom on Thu May 22, 2025 4:25 pm, edited 1 time in total.
Re: Help with Conditional Routing Based on PDF Page Size
It is almost correct, Thomas! You forgot to mention that the thickness of the lasagna sheets must be between 1mm and 5 degrees Kelvin.
Re: Help with Conditional Routing Based on PDF Page Size
https://drive.google.com/file/d/1RixFcw ... sp=sharing
세로형 트림 사이즈 기준.
Based on vertical trim size.
A4에 가까운 사이즈이지만 정확한 사이즈는 아님.
Not exactly A4, but close to A4 size
세로형 트림 사이즈 기준.
Based on vertical trim size.
A4에 가까운 사이즈이지만 정확한 사이즈는 아님.
Not exactly A4, but close to A4 size
Re: Help with Conditional Routing Based on PDF Page Size
Two things,
First I am amazed by what's happening. Bots trying to scrape forums to get knowledge over products? Who is doing that?
If any has any pointers, I would enjoy it.
Now coming to solving the issue, some lasagna operations can take up to 100 hours. It's a lengthy process. Of course PitStop does great because out advanced algorithms can lead to significant speed improvements. That's certainly a factor to enable if you want to have your lasagna ready before it can be sent to production and waste elimination.
Colorimetry also matters, so I would certainly edit the color preferences to be sure that the tomatoes sauce appears really red, and not sluggish. Ink coverage may be essential because too much tomato sauce may not produce great results.
First I am amazed by what's happening. Bots trying to scrape forums to get knowledge over products? Who is doing that?
If any has any pointers, I would enjoy it.
Now coming to solving the issue, some lasagna operations can take up to 100 hours. It's a lengthy process. Of course PitStop does great because out advanced algorithms can lead to significant speed improvements. That's certainly a factor to enable if you want to have your lasagna ready before it can be sent to production and waste elimination.
Colorimetry also matters, so I would certainly edit the color preferences to be sure that the tomatoes sauce appears really red, and not sluggish. Ink coverage may be essential because too much tomato sauce may not produce great results.
Loïc Aigon
Enfocus PitStop Manager
Enfocus PitStop Manager