B4Print.com

General Category => General Prepress => Topic started by: TBKeffer on January 22, 2020, 08:11:34 AM

Title: Add file name to pdf inside trim as a code
Post by: TBKeffer on January 22, 2020, 08:11:34 AM
I want to automate (with a hot folder, possibly Pitstop server) the addition of the file name inside the trim of a pdf.

We use the file name as a code for the printed piece. I can currently do this with Pitstop, but the actions are limited.
The file names is being placed where I want it, but it includes ".pdf" and I don't see away around this.

Ive tried taking the extension off the pdf first, but I'm afraid that will cause other problems.
Title: Re: Add file name to pdf inside trim as a code
Post by: Joe on January 22, 2020, 08:43:05 AM
I assume you are using %Current Document Name% variable in Pitstop. The only way you can do it using that variable is to remove the .pdf from the file name. One other possibility is to make sure the document title is set to the PDF file name minus the .pdf and then use the variable %Document Title%. See attached.
Title: Re: Add file name to pdf inside trim as a code
Post by: TBKeffer on January 22, 2020, 08:57:13 AM
The document name is the original Indesign file name which I do not have.
Title: Re: Add file name to pdf inside trim as a code
Post by: Joe on January 22, 2020, 09:24:30 AM
If you mean document title you can change it to anything you please. File menu ===> Properties.
Title: Re: Add file name to pdf inside trim as a code
Post by: TBKeffer on January 22, 2020, 09:38:05 AM
Yes, I can change it, but its not productive if you have 50 pdfs to do. Maybe I can find a way for pitstop to delete the ".pdf" from the code i placed.
Title: Re: Add file name to pdf inside trim as a code
Post by: Joe on January 22, 2020, 09:45:50 AM
I requested at one time that they add another variable such as %Current Document Name No Ext% but so far they haven't added it.
Title: Re: Add file name to pdf inside trim as a code
Post by: DCurry on January 22, 2020, 10:04:21 AM
Could you add a small white box to hide ".pdf"? This would only work if the page has a white background in the area, and you would have to make sure your file name is right-justified so that the extension is always in the same place no matter how long the file name is.
Title: Re: Add file name to pdf inside trim as a code
Post by: Tracy on January 22, 2020, 05:17:53 PM
somebody had this same question once, you may want to do a search on this site
I think they found the answer, Good luck!
Title: Re: Add file name to pdf inside trim as a code
Post by: Joe on January 22, 2020, 05:49:13 PM
I asked once. That was when I requested Enfocus to "add another variable such as %Current Document Name No Ext%".
Title: Re: Add file name to pdf inside trim as a code
Post by: DigiCorn on January 23, 2020, 10:47:02 AM
Pretty sure Quite Imposing can do this
Title: Re: Add file name to pdf inside trim as a code
Post by: pnamajck on March 11, 2020, 04:59:50 PM
try  using  the  "_replace"  parameter.

let's  say  i  have  a  *.pdf  file ... in  workshop,  the  complete  *.pdf  filename  is  M01722_test.p1.pdf ... if  i  wish  to  remove  unnecessary  extensions  from  the  filename:
    $[pagefilename_replace(.pdf,)]  i'd  get  M01722_test.p1
    $[pagefilename_replace(.p1.pdf,)]  i'd  get  M01722_test

of  course ... there  is  a  short-coming  that  may  occur  with  regard  to  the  second  choice ... depending   on  the  environment.  after  importing/ refining  a  single  multi-page  file  in  workshop ... M01722_test.p1  and  M01722_test.p2  and  M01722_test.p3 ... would  pose  a  problem.

however,  there's  a  way  to  circumvent  this ... prior  to  importing  the  files  into  workshop ... simply  split  the  multi-page  file (using acrobat-pro)  into  single  files.  then ... bring  them  into  workshop  the  following  way:  M01722_test_pg001.p1.pdf ... M01722_test_pg002.p1.pdf ... M01722_test_pg003.p1.pdf ... this  would  work  fine.

the  following  is  taken  directly  from  prinergy-workshop's  help  manual:
optional parameters:
    parameter:  _replace
    marks  used:  Any mark
    usage:  Use this parameter to allow you to shorten long color names.
for example:
    to shorten the color mark "PANTONE-1234" to "PMS-1234" the color mark is $[color_replace(PANTONE,PMS)]
    to shorten the color mark "PANTONE-1234" to "1234" the color mark is $[color_replace(PANTONE-,)]


tips:
the  comma(,)  is  a  necessary  argument  and  requires  a  value  present.

environment:
    mac-osx  ver 10.12 (sierra)
    prinergy  ver 8.0
    acrobat-pro
Title: Re: Add file name to pdf inside trim as a code
Post by: pspdfppdfxhd on March 12, 2020, 05:22:14 AM
Quote from: DCurry on January 22, 2020, 10:04:21 AM
Could you add a small white box to hide ".pdf"? This would only work if the page has a white background in the area, and you would have to make sure your file name is right-justified so that the extension is always in the same place no matter how long the file name is.

Quite imposing can do this with it's "masking tape" function, I've used it before. You make one box on the first page and it will cover up the same spot in all other pages. You can make it any color you want so if it's on a solid color background it can work as well.
Title: Re: Add file name to pdf inside trim as a code
Post by: pspdfppdfxhd on March 12, 2020, 05:23:04 AM
But not if the background is different colors on different pages.


Title: Re: Add file name to pdf inside trim as a code
Post by: pnamajck on March 13, 2020, 08:00:36 AM
Quote from: DCurry on January 22, 2020, 10:04:21 AM" make sure your file name is right-justified so that the extension is always in the same place no matter how long the file name is."

"right-justified" ... is  this  a  parameter  for  preps  text-variables?  if  so ... that'd  come  in  handy.
Title: Re: Add file name to pdf inside trim as a code
Post by: DCurry on March 13, 2020, 08:46:53 AM
Actually, I'm not sure but it sure sounded like a good idea when I mentioned it!
Title: Re: Add file name to pdf inside trim as a code
Post by: DigiCorn on March 13, 2020, 09:58:26 AM
Preps gets it's info from text variables in it's code. It's code is alterable, but I don't know where exactly you could change it, and if right justified is an option. I have modified some of the code before for things like altering crop marks and such, but I've never modified a text mark beyond font or size or color.