Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
So this works with PRO but does anyone have script that will work
with Reader?
Copy link to clipboard
Copied
The code will be saved as part of the pdf file, so regardless of where you run it, Reader of Pro or Standard the code will execute. I saved the PDF in pro and all the users that read our documents use Reader to read the pdf file. Once they go to print the file the code executes.
Copy link to clipboard
Copied
Is there any way to get the time printed?
Copy link to clipboard
Copied
Have you tried running the code?
The 'util.printd()' is a method to format the JS data time object. What is displayed is controlled by the formatting string entries to select the elements of the date time and how to format those selected elements.
For example the above code will create the following string:
"Thursday May 26 2011 3:07 pm (/C/Program Files/Adobe/Acrobat 8.0/Help/ENU/JS_api_reference.pdf)"
With additional programing, you can even get the timezone offset and the UTC time.
Copy link to clipboard
Copied
Reinhard,
Greetings. I just found your script for adding the footnote that includes the date and the file path to the page. I also read the many subsequent posts to your code. Can you tell me which post/code that will print the footnote, but does not throw the warning when you press the 'Yes' button when the "Warning: JavaScript Winow Delete Date / Filename"?
Many thanks for the code and any help you can give. I am working in Adobe Acrobat 9.4.6 if that helps?
Thanks,
Richard
Copy link to clipboard
Copied
Mmmh,
I'm not sure what script you used:
1. SetRemoveFooter.js ( = folder level javascript, which produce a Menuitem "Set/Remove Footer" under File) or
2. AcFooterBatch.vbs ( = VBScript which uses activeX to execute from 1. extracted footer javascript in a batch via drag and drop or commandline)
In 1. is no button, in 2. is only OK/Cancel button. For me both works without warning (AAv9.2.0). The only setting I change from standard is the presetting for javascipt (under edit). I marked the second selection (execute js via menuitem). Perhabs you test that.
best regards, Reinhard
PS: Menitems description free translated from german verrsion
Copy link to clipboard
Copied
Reinhard,
Greetings, I am trying to use the script PrintWithFooter.js. The file path I have is is so long that it is overlapping the page number. I do not need the page number, just the file path and the date it is being printed. Does this help?
Best Regards,
Richard
Copy link to clipboard
Copied
Hi,
it seems you have an older version. In the latest you can choose if you only want to print Date and filename only.
The latest version you can download from:
http://www.Refob.de/downloads/acrobat/SetRemoveFooter.js
If you have the old version I assume you can delete or comment out (= write // in the front of the text) this lines:
var fp = this.addField(String("page"+p+1), "text", p, [330,10,280,28]); //<- this set up the page number file
fp.textSize=8; fp.value = "Page: " + String(p+1)+ "/" + this.numPages; //<- this fomat the page number field
If that not help, please copy in the js-code you work with, so also other with a more compareable working time, can give you the small changes.
best regards, Reinhard
Copy link to clipboard
Copied
Hi ReinhardF!
I would like to have a footer showing only this:
The full file path + date
What changes should I do in your original script which, however, works perfect in AA X.
Regards
Arne
Copy link to clipboard
Copied
Hi,
you can change in the script following lines:
var AcDateFormat = "yyyy/mmm/dd HH:MM"
to
var AcDateFormat = "yyyy/mmm/dd"
and
fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
to
fd.value = util.printd(AcDateFormat, AcDate) + " (" + Path +")";
best regards, Reinhard
Copy link to clipboard
Copied
Thanks, I have allready changed those two lines.
But I would also get rid of all lines that is about page numbers, because I will not use that.
How to change the line : fd.value = util.printd .........................
to show the full path first an then the date?
Thanks in advance!
Best regards
Arne
Copy link to clipboard
Copied
Change to:
fd.value = "Path: " + Path +" Date: " + util.printd(AcDateFormat, AcDate);
or similar, where "..." is "my Text".
HTH, Reinhard
Copy link to clipboard
Copied
Reinhard,
Dies ist eine sehr gute Arbeit!
I have read this thread with interest since I nioticed it today and have placed your JavaScript in my Acrobat 6.0 install folder. I have been able to make modifications to the components of the footer (date format, adding PRELIMINARY to the textstring, changing text size). It works very well and gives me a new tool for identifying preliminary versions of manuals.
Would you explain how to change the location of the footer? I would like to place it a little higher on the page.
BTW, I noticed that Acrobat has a feature called Add Headers & Footers but it is much more time consuming to use and does not have the flexibility, ease of use, and performance of your script.
Danke,
Michael F
=======
Copy link to clipboard
Copied
Danke Michael,
habe einfach nicht die Zeit es mal komplett - mit mehr Optionen - zu überarbeiten.
"Would you explain how to change the location of the footer? I would like to place it a little higher on the page."
You can inrease the y-coordinates: upper left (y1) and lower right (y2):
If you want the field 10 Pts higher you can change:
var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
to
var fd = this.addField("xftDate", "text", p, [30,15+10, TotWidth-30-30,30+10]);
The difference between y1 and y2 is the field hight.
The calculation for the field placing on the page start at lower left corner (= 0).
HTH, Reinhard
Copy link to clipboard
Copied
This goes both to ReinhardF and Michael314!
I'm a total novise as far as programming is concerned. I have ReinhardF's javascript and it works perfect i AA X.
I wonder if some of you experts could make me a Javascript that show the full file path and nothing else on the first page only of a document as a footer.
Please give me the option of choosing between left, center or right position.
Thanks!!!!
Best regards
Arne
Copy link to clipboard
Copied
Arne,
Reinhard did give you a hint back in post 124.
Change the fd.value statement to this:
fd.value = "Path: " + Path;
When you open the PDF file and select any of the Set Date... commands, it will insert only the file path.
I think the pages affected are controlled by this statement but I don't know how to adjust it.
for (var p = 0; p < this.numPages; p++)
Yours,
Michael F
=======
Copy link to clipboard
Copied
"I think the pages ..." thats correct.
@ Arne
Change:
for (var p = 0; p < this.numPages; p++)
to
for (var p = 0; p < 1; p++)
to get it only on the first page, or:
for (var p = 1; p < this.numPages; p++)
to get it on all, but not on first.
The second question: "Please give me the option of choosing between left, center or right position" astonished me. It's already in the menu selection. I think at least you can test the script before asking.
best regards, Reinhard
Copy link to clipboard
Copied
Hi!
Sorry about that second question, it is already solved.
The last thing I 'll ask is what lines to be removed when I don't need the page numbering.
Thanks for the great effort!
Best regards
Arne