OL Learn

Final PDF file name should be the same name as the PDF I am using

Hi:

I am taking ready made PDFs and passing them through Workflow to add OMR codes and sequence numbers.

All this works great, however I need the final output files to have the same names as the PDFs I am using to begin with.

How can i do this?

(input) NAME_OF PDF.PDF -----> Workflow ----> (output) NAME_OF_PDF.PDF

Thanks,

Cecile

Hello, you need to use the %o in your plugin which creates the PDF. %o is a system variable which is the original filename.

What are you using…Create PDF, PlanetPress Image or DigitalAction?

Hi Cecile,

You’re looking for the system variable of “Original File Name”.

In your Output plug-in, right click on the File Name field and you’ll be given a menu. Go to Variables > System. In this final menu fly-out, you’ll see many possible variables to use in your filename, as well as the variables themselves.

Note that any time you see a field name in maroon like this one, you can right click to see a similar menu allowing you to build dynamic inputs.

This is in the output preset that I’m building the file name.

I am using the output preset because of creating the OMR code.

That’s right. Any output will do as long as it makes a file. They all have the File name option I mentioned and all accept the same variables accessible through the right click menu.

If it is an output preset that you want to produce the named PDFs:

  1. in the workflow create a variable ‘orig_fname’ and use %o to assign the original file name to it
  2. in the datamapper, add automation variable called orig_fname
  3. in the datamapper, add a java script field and set it’s value to ‘automation.variables.orig_fname;’
  4. in the job preset add the orig_fname field to metadata
  5. in the output preset use the metadata field as the file name

isn’t there a way to access the OriginalFilename property (Automation variable) of the datamapper directly in the output preset?