Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Help!] Rename numerous PDF files

Status
Not open for further replies.

bittware

Full Member level 4
Joined
Apr 3, 2004
Messages
208
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,296
Activity points
1,986
I have 2000 archives in pdf, want to rename each one, according to a field that is within each file, is this possible one?

Thanks in advance!
:) :) :)
 

Yes it possible! This naming tag used by some plugins for Netscape Enterprise Web Server (could be more servers) Adobe makes.

You can control filenames, do pretty neat things, DAV services. There are websites out there which have databases with PDF files and easily manipulate them (and extraction, modification) via some cgi scripts.

I tell you what!
It is beyong the your scope. Sorry.


Do something else with Acrobat: It has a mini-feature of Catalog (see picture) with which you can attach for search. It is somewhat efficient!
 

djalli, is it possible to save the content of 'full-text index' into a text file?
 

bittware said:
I have 2000 archives in pdf, want to rename each one, according to a field that is within each file, is this possible one?

Thanks in advance!
:) :) :)


Hi

Ya, It is possible very simply by a perl script.

Please specify the format of naming schema for your files and exctly what you want to change, then I will write you a simple perl script to do it.


tnx
 

I guess what bittware wishes to do is to rename each file according to one of the fields (e.g. Document Properties -> Description -> Title) of the respective PDF document. If my guess is correct, is it possible to do that (extract the 'Title' field of each PDF document) using Perl script?
 

jimjim2k said:
bittware said:
I have 2000 archives in pdf, want to rename each one, according to a field that is within each file, is this possible one?

Thanks in advance!
:) :) :)


Hi

Ya, It is possible very simply by a perl script.

Please specify the format of naming schema for your files and exctly what you want to change, then I will write you a simple perl script to do it.


tnx
Hello jimjim2k,
It's great. I am very appreciated if you could provide the sample perl script and indicate how to use it. My rename scheme is rather simple that using the initial sentence of the PDF file as the file name and if possible prefix the document created time is perfect! :) :) :) :) :) :)
 

nicleo said:
I guess what bittware wishes to do is to rename each file according to one of the fields (e.g. Document Properties -> Description -> Title) of the respective PDF document. If my guess is correct, is it possible to do that (extract the 'Title' field of each PDF document) using Perl script?
Hello nicleo,
You almost described my intention. :)
But when I used some sort of PDF tool to rename my PDF files in batch mode by which renames PDF file as the Document Properties -> Description -> Title, I found that many file are lack of such information i.e. this property field is often empty. So I gave up this scheme and intend to using the exact title in PDF content as the PDF file name. However you know, if you manually implemented such work, it is tremendously boring. So here I am to ask for you help. :) :) :)
 

djalli said:
Yes it possible! This naming tag used by some plugins for Netscape Enterprise Web Server (could be more servers) Adobe makes.

You can control filenames, do pretty neat things, DAV services. There are websites out there which have databases with PDF files and easily manipulate them (and extraction, modification) via some cgi scripts.

I tell you what!
It is beyong the your scope. Sorry.


Do something else with Acrobat: It has a mini-feature of Catalog (see picture) with which you can attach for search. It is somewhat efficient!
Hello djalli,
Sorry, I cant catch your point.
I cant repeat the environment appeared in your sceen capture. I cant find Advanced menu item. Do I need some third party Acrobat plugin?
Anyway, thanks for your warmhearted reply. :) :) :)
 

bittware said:
You almost described my intention. :)
But when I used some sort of PDF tool to rename my PDF files in batch mode by which renames PDF file as the Document Properties -> Description -> Title, I found that many file are lack of such information i.e. this property field is often empty. So I gave up this scheme and intend to using the exact title in PDF content as the PDF file name. However you know, if you manually implemented such work, it is tremendously boring. So here I am to ask for you help.
I guess I see your problem and intention. Frankly speaking, I also encounter the similar problem (wish to rename many pdf files). It's very time consuming to repeat these steps: Open the PDF file, click Save As ..., then type the article title, after that press OK, then delete the old file. If we repeat these procedures for 2000 times, I think our eyes will be suffered and back will be painful. :)

In my opinion, PDF documents can be grouped as follows:
1) Title Field is NOT empty
2) Title Field is EMPTY but the PDF text is EDITABLE
3) Title Field is EMPTY and the PDF text is NON editable (ie. image/scanned type)

The 1st one is easier to handle, for example the 'PDF tool' mentioned in your post, or the Catalog method suggested by djalli). In my opinion, the 3rd one is the most difficult to deal with. Unfortunately, most of the PDF documents available in the internet are either 2nd or 3rd type. If other methods (softwares, Perl, or CGI script) could not do it, then we might need to write ourselves the software to do it. Probably, we need to integrate kind of OCR technology (may be plus little intelligent algo to identify the proper 'OCRed' text as title) into the software, so at least the software can 'type' the title for us, which will reduce the time (of renaming) significantly, especially when the title is very long and our typing speed is like turtle. If we can solve the 3rd one, I think 1st and 2nd will be solved as well. Hopefully moderator jimjim2k and djalli will find a solution for our problem. Thanks in advance.

To bittware:
What is the "PDF tool", which mentioned in your post, that you use to extract, for example, the title field of the PDF document and rename the respective PDF document according to the title field? Pls share.
 

nicleo said:
bittware said:
You almost described my intention. :)
But when I used some sort of PDF tool to rename my PDF files in batch mode by which renames PDF file as the Document Properties -> Description -> Title, I found that many file are lack of such information i.e. this property field is often empty. So I gave up this scheme and intend to using the exact title in PDF content as the PDF file name. However you know, if you manually implemented such work, it is tremendously boring. So here I am to ask for you help.
I guess I see your problem and intention. Frankly speaking, I also encounter the similar problem (wish to rename many pdf files). It's very time consuming to repeat these steps: Open the PDF file, click Save As ..., then type the article title, after that press OK, then delete the old file. If we repeat these procedures for 2000 times, I think our eyes will be suffered and back will be painful. :)

In my opinion, PDF documents can be grouped as follows:
1) Title Field is NOT empty
2) Title Field is EMPTY but the PDF text is EDITABLE
3) Title Field is EMPTY and the PDF text is NON editable (ie. image/scanned type)

The 1st one is easier to handle, for example the 'PDF tool' mentioned in your post, or the Catalog method suggested by djalli). In my opinion, the 3rd one is the most difficult to deal with. Unfortunately, most of the PDF documents available in the internet are either 2nd or 3rd type. If other methods (softwares, Perl, or CGI script) could not do it, then we might need to write ourselves the software to do it. Probably, we need to integrate kind of OCR technology (may be plus little intelligent algo to identify the proper 'OCRed' text as title) into the software, so at least the software can 'type' the title for us, which will reduce the time (of renaming) significantly, especially when the title is very long and our typing speed is like turtle. If we can solve the 3rd one, I think 1st and 2nd will be solved as well. Hopefully moderator jimjim2k and djalli will find a solution for our problem. Thanks in advance.

To bittware:
What is the "PDF tool", which mentioned in your post, that you use to extract, for example, the title field of the PDF document and rename the respective PDF document according to the title field? Pls share.
Hello nicleo,
You can obtain the PDF tool via **broken link removed** for free.
Unfortunately, the software author seems had not updated it for a long time. Even worse, when I used it I encountered a bunch of bugs :(
Regardless, this PDF tool is most close to my expectation so far.
I wish the author could keep on going, it is really useful.
 

djalli said:
bittware said:
I cant find Advanced menu item. Do I need some third party Acrobat plugin?
Anyway, thanks for your warmhearted reply. :) :) :)
It menu of Adobe Acrobat Pro 6.0. No plugin.
I got it. :wink:
However, Acrobat Pro 6.0 is always running slowly for me. :(
 

Hi

Here is a complete solution for your request.

I have developed two simple perl scripts plus using pdfinfo.exe of xdpf project and done the task.

please carefully read advpdfrename.pl and its comments.
This program is so flexible that you can do everything you may want to do.

Please note:
1. Some pdf files have not any good info in their catalog xref
2. Some pdf files have security restrictions, you must remove them before using advpdf tool.
3. Please specify you other exact tasks if these program does not meets you task.
4. This program is dedicated to all members of this forum.
5. A sample directory with sub-directories and excerpt pdf files are included.
6. An screenshoot of running program is included.
7. If you want to see the flow of operations during the run, change the value of $debug from 0 to 1 in the .pl file.

Any comments and bug reports are welcomed.

tnx
 

Guess Perl compiler (???) is required to run the program. Am I correct? Pls advise. Thanks.
 

If you are in dos(win), you can use simply a batch file to rename them
 

nicleo said:
Guess Perl compiler (???) is required to run the program. Am I correct? Pls advise. Thanks.



Hi

Yes, It needs Perl to installed.
Download it freely from the net. I recoomend activestate version.

tnx
 

rezamortazavi2003 said:
If you are in dos(win), you can use simply a batch file to rename them


Hi

I am sorry. It seems that you did not read the message carefully.
The task is to rename files from the info within them.


Re-Read the post please. :) :(

tnx
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top