Topic Options
#31487 - 08/05/09 05:22 PM File Name a PDF using PDF Split
jmatos Offline
OL User

Registered: 09/28/04
Posts: 80
Loc: Waco, TX
I was wondering if it is possible to name the File Name for a split PDF when using "On region content change" to do the split. I want to see if it is possible to use that data to name the PDF that is outputted. Using PDF Splitter in PP7 Production/

thanks
_________________________
--
Jose Matos
integdoes.com
http://integdoes.com

Top
#31488 - 08/06/09 09:51 AM Re: File Name a PDF using PDF Split
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4953
Loc: Objectif Lune Montreal
jmatos,

You can make a "Rename" action right after the splitter, and it will rename the split files. You can put whatever you want as the names, but if you want something like a counter, you may have to precede the rename with a little vbscript that would store a counter value in a text file, increment it every times a split file is created, and put it in a job info which you can then use in the Rename action.

The script could be something simple like this:

Code:
Option Explicit

dim FSO
dim CounterFile
dim curval

set FSO = CreateObject("Scripting.FileSystemObject")
set CounterFile = FSO.OpenTextFile("C:\counter\counter.txt", 1)

curval = CounterFile.ReadLine
Watch.SetJobInfo 9, curval

CounterFile.Close

set CounterFile = FSO.OpenTextFile("C:\counter\counter.txt", 2)

curval = CStr(CInt(curval) + 1)
CounterFile.WriteLine(curval)

CounterFile.Close
With this, the counter will increase every times a file is split, and will be stored in a text file. The text file should be precreated with a value of 1 on the first line.

Hope that helps.

Regards,
Rapha

Top
#31489 - 08/06/09 03:38 PM Re: File Name a PDF using PDF Split
jmatos Offline
OL User

Registered: 09/28/04
Posts: 80
Loc: Waco, TX
I was wondering if i could use the data that I am splitting on as the File Name.

thanks
_________________________
--
Jose Matos
integdoes.com
http://integdoes.com

Top
#31490 - 08/06/09 03:41 PM Re: File Name a PDF using PDF Split
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4953
Loc: Objectif Lune Montreal
jmatos,

Yes. In the rename action, you can right-click and choose "Select Data", and choose a region of your data where the file name will be built from.

Regards,
Rapha

Top
#31491 - 08/06/09 04:14 PM Re: File Name a PDF using PDF Split
jmatos Offline
OL User

Registered: 09/28/04
Posts: 80
Loc: Waco, TX
Great! Thanks that worked!
_________________________
--
Jose Matos
integdoes.com
http://integdoes.com

Top