Generate random numbers when the pdf file is opened

I tried to write a script that generates a random 12-digit number when the PDF opens.  I need the number appears in a certain read only field on the pdf file.  I tried write the script in the script of the document and have failed.  (The number random and another part of the document will be used to extract information from it at a later date.)  Can someone help me with a script so that I can make this possible?

Do you want a new random number whenever the file is opened? If Yes, enter

Copy the following code as a script at the level of the document (not inside a function!):

this.getField("fieldname").value =.

Math.Floor (Math.Random () * Math.Pow (10,12));

Tags: Acrobat

Similar Questions

  • V11.0.12 XI and IE11 Acrobat. Hyperlink inside the PDF does not work when the PDF file is opened with any browser.

    V11.0.12 XI and IE11 Acrobat. Hyperlink inside PDF is a blue rectangle and links to another PDF. When PDF is opened in Acrobat, the link works. When opened in any browser (IE, Firefox, Chrome) the link does not work. How can I get the link to work in browsers?

    I think it is a bug. I uninstalled Acrobat and reinstalled Acrobat v11.0.0. I tried the link and it works properly. Then, I installed each both updated and tested the hyperlink. Update 1-10, that the link works. However, when the 11.0.11 update is installed, the "Go to a page in another document" hyperlink stops working in browsers. V11.0.12 installation does not solve the problem. If I uninstall Acrobat and install v11.0.0 with updated v11.0.10, everything works fine.

  • When a pdf file is open in a tab, automatic scrolling of the cushion does not work in the other tabs, but only for the specific PDF tab.

    The Tablet/mouse scroll function does not work for the other tabs when a PDF file is opened.

    Hi ESNE,.

    Have you checked to see if your PDF is updated? You should take a look at the Base files display PDF in Firefox article. There are lots of good information in there. You should try both of the suggested PDF Add-ons to see if this solves the problem.

    Hope this helps!

  • Hide a button when a pdf file is opened?

    Hi all

    I created a PDF form using LiveCycle 8.0 who must hide or disable (or the other would be nice) a button when the pdf file is first opened, as there are already entries by the user text in a form field. This would be due to users opening, enter data into the text field and then have backed up previously.

    Here's the javascript code I've tried so far.

    var k is form1. Table.subject.Paragraph.subject_name.rawValue;

    If (k.length! = 0) {}

    Form1. Button1.presence = 'Hidden ';

    Form1. Button1.access = "readOnly";

    }

    I put the code in the "docReady', ' form: ready ' and ' layout: ready ' events of my form, but when I open the form after the recording of the text in the text field, the button is always visible to the closing and reopening of the form.

    The weird part is, if I set the 'Default' text box property to any value non-zero and test it in the Preview tab, it works!

    It seems that even if the default property is defined (and detected) by the events above before all entries by the user (and saved) text is loaded into the text box on a form fields, so what I'm checking do appear to be capture input by the user to the point that they are triggered.

    Basically, I'm asking how to check for text entered by the user (i.e. is not part of the 'default' text field property) in a text field and then disable or hide a button on the form on the pdf being opened?

    What events should have my code in them?

    If it's "layout: ready", which?  That of the shape, the text field or button I want to hide?

    Thanks in advance for all replies,

    DJF

    Thanks to all for the replies.

    I solved the problem.  My script just wasn't running.  I forgot to open the form in Acrobat Pro and do a ' advanced-> enable usage rights in Adobe Reader.  As soon as I did, everything went very well.

    Thanks again help him!

    DJF

  • How to set the orientation of page with postscript when the pdf file is displayed in Adobe Acrobat format?

    I have a program that generates a postscript and then 'prints' the script in a PDF file using gs.

    The user can opt for the document in landscape format.  The program handles this with the addition of the 'Rotation 90' command early in the script.  It works without problem.  When the user opens the PDF file in Adobe Acrobat, it is displayed in landscape orientation.

    In addition, the user may have a "watermark", adding the document which is the text at an angle of 60 degrees.  This is handled by the emission of the "rotation of 60", then the text of the watermark, then "rotation-60.  This also works without problem.  The resulting PDF file has watermark text at an angle of 60 degrees to the rest of the text in the document.

    The problem is when these two options are used together.  The document is correctly mounted (in orientation landscape with a watermark properly tilted), but it is displayed in Acrobat in portrait, forcing the user to rotate to be able to read it.  When I look at the postscript, it seems OK, just the sum of these two options:

    rotation of 90

    things...

    60 rotate

    ... watermark text...

    turn-60

    ... the rest of the document...

    'Net turnover' is 90, leading me to believe that it would be displayed in landscape orientation, but it is displayed in portrait mode.

    There is no other sizing page not declared in the script.

    How can I get the document to display in the landscape when opened in Acrobat?  Thank you.

    Check to see that the 'gs' (ghostscript) isn't reorienting the page, by default, based on what he thinks is the correct meaning of reading.

  • Letters disappear when the PDF file size reduction.

    I have a PDF file of several page that contains bitmap images and vector of text. It was originally created in InDesign and exported in PDF format. When I exported the PDF file at 300 dpi, all rendered beautifully. However, when I reduced the quality of image by optimizing PDF (all images of 80 dots per inch at high quality), random letters of my text disappered. Weird, since they are vectors and should not be affected by lowered anyway ppp settings.

    The gaps are where letters should be, and I can even use my text cursor to copy and paste the missing letters in a text file, for example. So basically, all the data is still there, just letters are not displayed. This is not resolved by zooming, and unfortunately, the letters also are not displayed when the document is printed. I have all my embedded fonts. Would be - this due to the fact that I use a light font? (Verlag Extra light). The letters that will miss seem to be completely at random. I have Acrobat Professional 8.

    Rather than use PDF Optimization, try using a lower export setting in InDesign and see if it works (use press or quality print settings but less than the resolution of the image.)

  • PANTONE black when the PDF file opened in preview

    Screen Shot 2012-06-28 at 11.57.58 AM.png

    I created models for a t-shirt design, this top photo, this is how the design looks like in illustrator with the correct Pantone: Blue C 3115, 119C red and black.

    When I save it as a PDF and it is opened in the Preview Application, certain colors black like this:

    Screen Shot 2012-06-28 at 11.57.46 AM.png

    This has happened several times lately and I recently spent Illy CS5 to CS6, so I wonder if that is why?

    Any clues guy? Help is greatly appreciated.

    The problem is with preview (and for that matter, to look at a PDF in Mac Mail). The program doesn't have the sophistication to read tones and display them with precision. I noticed this 'problem' before CS6 came, so the update for CS5 is not the problem.

    I have now got used to put a little warning in my emails when sending the PDF proofs: "Please see this PDF file in Adobe Acrobat or Reader. Overview of Mac and Mac Mail will not display the spot colors in the PDF file correctly. »

  • How to convert PDF to EXCEL when the PDF file is PROTECTED by SECURITY and I can't unprotect the file?

    I have some statements of AMEX which are PROTECTED by SECURITY PDF and I need to convert them to EXCEL to sum them up.

    Hello

    Around that, the only way is to get the AMEX password so that you can open the PDF file. As you have discovered, ExportPDF cannot process files that are protected by Word.

    Best,

    Sara

  • Is there a solution to play the video if the pdf file is opened in the browser?

    I have an integrated video (from server) in the PDF file. This video runs when I open the PDF file in Acrobat, but when I open it in firefox and chrome browser, video does play do not.

    Hi Sara,.

    Please check this document Acrobat help and see if it answers your question: http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

    Let us know how it goes!

    Best,

    Sara

  • How well Adobe to convert PDF to DOCX when the PDF file is only a LATEX generated PDF with a lot of equations.

    I create a lot of Latex documents that automatically export to PDF. I am interested in getting a DOCX format to help convert adobe PDF to docx, but there is no way to test this, is it good for Latex PDF with lots of equations?

    Unlikely that any use at all, I think. The PDF is not aware that it contains equations: only lines, symbols, fonts of specific placement. Go to the Word could preserve this in the form of a graph cannot be changed, but it's probably you leave nothing usable.

    Since nearly 20 years people have said. "I need to convert from X to Y." Can I convert X to PDF and PDF to y. work! "In fact, it is almost always the worst possible way to work.

    Maybe someone has created a tool for direct conversion.

  • print queue shows 24 MB when the pdf file is only 1 MB. printing crashes. JPEG print normally. OfficeJet 8500

    OfficeJet 8500, ser Win SP 3. Wireless - direct connection to the Belkin Modem/Router ADSL

    Worked normally.

    Print the PDF or other documents. Watch print queue size the document queue MB 24 or more when the file is only 1 MB.

    Printing takes a long time to get through.

    JPEG - normal queue and printing of print.

    Reinstalled all the software and printer cleared by unplugging all cables.

    Hello

    This is quite normal. According to many things, machine (laptop / PC) must send a lot of 'orders' down to the printer so the file becomes huge.

    Kind regards

  • Automaticlly adobe open when the pdf file is received as an attachment

    How to configure windows vista to open adobe automaticlly when a .pdf document is received as an attachment to e-mail?

    Vista is an operating system. You use Windows Mail?

    Cannot open. PDF of Windows Mail attachments
    http://www.Winhelponline.com/articles/236/1/Unable-to-open-PDF-attachments-from-Windows-mail.html

  • Click on a .pdf link does not open the .pdf file, it opens a SAVE DIALOG box

    Recently, when I click on a link to .pdf file I'm not able to open the file in an adobe reader or a FIREFOX Web page or open it using the full program from adobe. Instead, it opens a dialog box SAVE asking me to save it on my hard drive. I don't know what happened, and I'm trying to find someone who might know what is happening?

    I had the same problem, but I got by the following methods:

    Go to Firefox > Options > Applications > Portable Document Format (PDF)

    And for the Portable Document Format (PDF) set the State as "use Adobe Acrobat (in Firefox).

    Fact

    Now the PDF opens in the Firefox browser without having to download the file to open.

  • Error message when the chm file is opened and opening topics/links

    Hello

    I am a user of RoboHelp 10 and tried to generate HTML Help. When I try to open the chm file, you receive the following error message. When you click Yes or no to clear the error, it opens OK. The error message also appears WHEN you click a hyperlink in the project or open a topic.

    I use Windows 7 and have a computer laptop 64 bit.

    chm file error.gif

    Of course as it seems!

  • Links in the PDF are not open in Adobe Reader

    I created a PDF file from Adobe Acrobat that has links that open external web pages that works perfectly in Adobe Acrobat, but when the PDF file is opened in Adobe Reader, nothing happens when you click on links on. The cursor changes and the URL is displayed when hovering above, but when clicked on nothing happens. Now I tried the CTRL key and change various parameters "Trust Manager" in Preferences, but nothing seems to work. Do I need to save the PDF in a different format to allow links to be opened in Adobe Reader?

    Using Adobe Reader Version: 11.0.3 and Adobe Acrobat Version 11.0.10

    Hi Fallynn,

    Try this:

    Open drive

    Go in Edition > Preferences > Security (enhanced)

    Uncheck the Enable Protected Mode option

    Click OK and restart.

    Now, check the PDF file.

    Thank you

    Abhishek

Maybe you are looking for