# How to split and group PDF pages into new PDF files by keywords?

Hi

I have two splittags and one macrotag. The splittags are used to split the files and also to get parts in the output file name. I use the macro tag to get the right filename.
Normally they one or two pages and than the splittag 1 and 2 are changing and the PDF gets split. The macrotag used in the output file name is taken from the first page of the spliting part.

220_{splittag}_{splittag2}_{Macrotag1}

My problem is now, that in some cases we have like 10 different pages before the splittag changes. I would like to use the last page (the page where the file gets split) in the macrotag1 and in my filename and not the first page.

I there any way to do this?

Customer
-----------------------------------

Thanks for your message, we suggest you may download "VeryPDF PDF Content Splitter Command Line" software from following web pages to try,

https://www.verypdf.com/wordpress/201702/verypdf-release-notes-verypdf-releases-pdf-content-splitter-command-line-software-today-split-pdf-files-based-on-content-43329.html

https://www.verypdf.com/dl2.php/pdf-content-splitter-cmd.zip

You can use pdfcs.exe to get the position for a keyword from PDF pages first, for example,

pdfcs.exe -searchtext "keyword" C:\in.pdf
pdfcs.exe -searchtext2 "keyword" C:\in.pdf
pdfcs.exe -searchtext2 "keyword" -opw 123 -upw 456 C:\in.pdf
pdfcs.exe -searchtext2 "keyword" -casesensitive C:\in.pdf

for example, if you want to split PDF pages by "2010" keyword, you can run following command lines,

pdfcs.exe -$XXXXXXXXXXXXX -mode 0 -x 422 -y 139 test.pdf _out.pdf pdfcs.exe -$ XXXXXXXXXXXXX -mode 1 -x 422 -y 139 test.pdf _out.pdf

pdfcs.exe -\$ XXXXXXXXXXXXX -mode 2 -x 422 -y 139 test.pdf _out.pdf

However, pdfcs.exe can only split and group PDF pages to new PDF files by one word at special position in the current version, if you wish to split and group PDF pages by more keywords, you may send to us your sample PDF file, after we check your sample PDF file, we will figure out a solution to you asap.

VeryPDF

VN:F [1.9.20_1166]