Rules | Recent posts | topic RSS | Search | Register  | Log in

[Help!] Rename numerous PDF files

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Elementary Electronic Questions
Author Message
bittware



Joined: 03 Apr 2004
Posts: 199
Helped: 1


Post26 Sep 2004 5:00   [Help!] Rename numerous PDF files

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!
Smile Smile Smile
Back to top
djalli



Joined: 10 Nov 2001
Posts: 887
Helped: 15
Location: 1600 Pennsylvania Avenue, Washington DC 20500


Post26 Sep 2004 6:42   [Help!] Rename numerous PDF files

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!



Sorry, but you need login in to view this attachment

Back to top
nicleo



Joined: 06 Sep 2004
Posts: 717
Helped: 60


Post26 Sep 2004 11:06   [Help!] Rename numerous PDF files

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



Joined: 17 May 2001
Posts: 1243
Helped: 10


Post26 Sep 2004 11:19   Re: [Help!] Rename numerous PDF files

bittware wrote:
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!
Smile Smile Smile



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
Back to top
nicleo



Joined: 06 Sep 2004
Posts: 717
Helped: 60


Post26 Sep 2004 12:02   [Help!] Rename numerous PDF files

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?
Back to top
bittware



Joined: 03 Apr 2004
Posts: 199
Helped: 1


Post26 Sep 2004 13:40   Re: [Help!] Rename numerous PDF files

jimjim2k wrote:
bittware wrote:
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!
Smile Smile Smile



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! Smile Smile Smile Smile Smile Smile
Back to top
bittware



Joined: 03 Apr 2004
Posts: 199
Helped: 1


Post26 Sep 2004 13:53   Re: [Help!] Rename numerous PDF files

nicleo wrote:
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. Smile
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. Smile Smile Smile
Back to top
bittware



Joined: 03 Apr 2004
Posts: 199
Helped: 1


Post26 Sep 2004 14:03   Re: [Help!] Rename numerous PDF files

djalli wrote:
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. Smile Smile Smile
Back to top
nicleo



Joined: 06 Sep 2004
Posts: 717
Helped: 60


Post26 Sep 2004 17:12   Re: [Help!] Rename numerous PDF files

bittware wrote:
You almost described my intention. Smile
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. Smile

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.
Back to top
djalli



Joined: 10 Nov 2001
Posts: 887
Helped: 15
Location: 1600 Pennsylvania Avenue, Washington DC 20500


Post26 Sep 2004 19:08   Re: [Help!] Rename numerous PDF files

bittware wrote:
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.
Back to top
bittware



Joined: 03 Apr 2004
Posts: 199
Helped: 1


Post27 Sep 2004 2:31   Re: [Help!] Rename numerous PDF files

nicleo wrote:
bittware wrote:
You almost described my intention. Smile
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. Smile

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 http://rtt.planetaclix.pt 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 Sad
Regardless, this PDF tool is most close to my expectation so far.
I wish the author could keep on going, it is really useful.
Back to top
bittware



Joined: 03 Apr 2004
Posts: 199
Helped: 1


Post27 Sep 2004 2:34   Re: [Help!] Rename numerous PDF files

djalli wrote:
bittware wrote:
I cant find Advanced menu item. Do I need some third party Acrobat plugin?
Anyway, thanks for your warmhearted reply. Smile Smile Smile

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. Sad
Back to top
jimjim2k



Joined: 17 May 2001
Posts: 1243
Helped: 10


Post29 Sep 2004 10:52   Re: [Help!] Rename numerous PDF files

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



Sorry, but you need login in to view this attachment

Back to top
nicleo



Joined: 06 Sep 2004
Posts: 717
Helped: 60


Post05 Oct 2004 11:58   [Help!] Rename numerous PDF files

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



Joined: 05 Oct 2004
Posts: 6


Post05 Oct 2004 12:09   Re: [Help!] Rename numerous PDF files

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



Joined: 17 May 2001
Posts: 1243
Helped: 10


Post05 Oct 2004 13:50   Re: [Help!] Rename numerous PDF files

nicleo wrote:
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
Back to top
jimjim2k



Joined: 17 May 2001
Posts: 1243
Helped: 10


Post05 Oct 2004 13:51   Re: [Help!] Rename numerous PDF files

rezamortazavi2003 wrote:
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. Smile Sad

tnx
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Elementary Electronic Questions
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap