OL Learn

PDF split based on metadata from Barcode scan

Hi everyone,

I’m trying to split one PDF file into multiple files based on metadata from DataMatrix (from Barcode scan task). I have one PDF file with 50 pages that contains different invoices. First process adds DataMatrix to each page with invoice number encoded in it. Then in the second process I want to read this DataMatrix and then split this big document into single invoices. My process at the beginning was: Folder capture -> Barcode scan -> PDF Splitter (based on metadata, Metadata level: data page, Sequencing is based on: The following rule: Barcode_Value Value changed) -> Send to Folder. The result of this process was an error:
W3001 : Error while executing plugin: Error opening ‘C:\MyFileLocation’: File does not begin with ‘%PDF-’. So I made a branch after Folder Capture in which I placed Barcode Scan and then saved MetaData (containing my document number) into variable using Set Job Infos and Variables task. My process reads DataMatrix properly and put document number into variable, but then I don’t know how to associate it with my PDF Splitter (which is now under the branch). Any suggestions? I know JavaScript so I can write a script here, but I have no idea what should I do.

I’ve tried it on my end and it works as expected, without requiring a branch. You have to make sure that your Barcode Scan task is set to Process by: File to ensure all datamatrix values in all pages are stored at the Data Page level in the metadata. Then, your splitter will work as expected.

1 Like

That works perfect, thank you very much!