How to extract date from pdf pages change to YYYYMMDD format for renaming?
Question
Solution
1. Import your PDF file into A-PDF Rename, click "Macro->Content Tag..." to edit Content Tag, mark the tag on date "DECEMBER 31, 2010" on sample PDF page;
2. Write below script in "Advanced" window:
var
aYear,mon,aday:string;
M:integer;
Begin
tag:=trim(tag);
aYear:=rightstr(tag,4);
mon:='JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC';
M:=pos(leftstr(tag,3),mon);
mon:=inttostr(m div 4); if length(mon)=1 then mon:='0'+mon;
aday:=copy(tag,pos(' ',tag)+1,2)
tag:=ayear+mon+aday;
end.
3. Run the script and you will get below result:
You can also use A-PDF Content Splitter, A-PDF AutoMail to rename split PDF files in the same way.
Related products
- A-PDF Rename - batch rename multiple PDF document based on content, metadata and file attributes(Size, Datetime) within PDF files. You can batch change or update multiple PDF files metadata (title, creator, producer, author, subject and keywords) as well as
- A-PDF Preview and Rename - Preview PDF content easily, rename PDF based on content you previewed.
- A-PDF Preview and Move - Preview content for multiple PDF files, then OCR page content to rename and define dest folder to move.
We always like improving our products based on your suggestions. Please send your feedback (or ask questions) to us in the contact page.