cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Member
New Member

Can you split by bookmark?

Can you split by bookmark and save as multiple pdfs?

0 Kudos
7 Replies
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Can you split by bookmark?

FreeFlow Core does not support use of bookmarks as a Split boundary. One can split out the content containing bookmarks from the content not containing bookmarks -- I assume this is not what you are after.

0 Kudos
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Can you split by bookmark?

You can do this with an External Process. Download the Python script found here:

https://github.com/joliver1981/PDFSplitter

To run the script you need Python which can be downloaded from here:

https://www.python.org/downloads/windows/

Install Python with the option "Add Python to PATH".

When Python is installed, from a command line install PyPDF2

https://pypi.org/project/PyPDF2/

The Python script can be run from a batch file and uses four parameters. Copy below into a text file and save to a .bat file. You might need to change the paths to where you installed Python and where you FreeFlow Core scripts are placed.

"C:\Program Files\Python38\python.exe" "C:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts\Split_PDF_Reports.py" %1 %2 %3 %4

Upload the batch file to the FreeFlow Core scripts folder (and the Python script if your batch file points to the Python script in this location) and use it in an External Process in a workflow. I set the parameters to:

"$FFin$" "C:\Temp" "$FFwfJob.jobName$" "False"

The result is multiple pdf files, one for each bookmark, in the folder C:\Temp

Stefan

 

0 Kudos
Highlighted
Xerox Analyst
Xerox Analyst

Re: Can you split by bookmark?

Stefan,

I got the script to work (workflow attached) and I made a couple of small tweaks to it.  The issue I am having is that in Core the workflow ALWAYS comes up and shows "Failed". It appears for some reason the exit codes are not being passed? I noticed some STRANGE behaviour on this script - If in the external component I leave the time at the bottom set to 150 then it will start to process the app via Python but it only processes maybe half of the job (watching the output folder).  Then after a while longer the rest of the job will appear. I added some logging to the .bat file to try and see the exit code but it never appears. If I change the timeout to like 5-10 seconds the job fails quickly, but the python script executes all pages immediately.  Curious if you see the same.  I am on a NEW VM of Server 2019 with fresh install of Python 3.8.2 and Core version 5.4.3 Workflow attached. (rename .zip to .ffc). Also attached the sample job I am using.  I moved the output from C:\Temp to the Core managed Save Destinations\Split by Bookmarks.

0 Kudos
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Can you split by bookmark?

My server shows the same behavior. I am also on 5.4.3. If I run it outside of FFCore with a batch file running the Python script then it works fine. However, if I comment out all lines in the Python script only there to write info to stdout, then it works also in FFCore, and it is really fast. Why it fails because FFCore writes to stdout I don't know. Anyway, simply replace all print with #print in the Python script. Then the batch file also exits ok and writes the status code 0 to the log file you created.

Stefan

0 Kudos
Highlighted
New Member
New Member

Re: Can you split by bookmark?


@Rdaley42 wrote:

Can you split by bookmark and save as multiple pdfs?


Freecore does not support. Acrobat has a few different ways to split up a PDF into multiple, smaller files, and one of them is by top level bookmarks. As long as you are generating bookmarks when you create a PDF from InDesign (this works with Word docs, too), you can ask Acrobat to break up the file for you.

0 Kudos
Highlighted
New Member
New Member

Re: Can you split by bookmark?


@Taj2854 wrote:

@Rdaley42 wrote:

Can you split by bookmark and save as multiple pdfs?


Freecore does not support. Acrobat has a few different ways to split up a PDF into multiple, smaller files, and one of them is by top level bookmarks. As long as QuickPayPortal you are generating bookmarks when you create a PDF from InDesign (this works with Word docs, too), you can ask Acrobat to break up the file for you.


Will you solve this problem

0 Kudos
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Can you split by bookmark?

Splitting on bookmark boundaries is a future feature for FFCore. When it is implemented is TBD -- depends on all the future feature priorities and available development bandwidth.

0 Kudos