setFocus pathing in order to link the PDF

I'm over my head.

Because that would be my first experience with Javascript (apart from taking
the class develop forms), I'm in uncharted territory.  Please take
a minimum level of experience of Javascript for all suggested courses
action and thanks in advance for any help.

My process is (or will be, hopefully) the automatic transformation of a
input XML into a potentially long PDF file consisting of 3 sections: the
Body, annex and Appendix B.  Appendices A and B will be dynamically
built from content in the XML input file.  I think I'll end up
compose each section independently, then use assembler to put the
three compound of sections together in a single PDF file.

The body is composed of several smaller sections, each of which can contain
(among other things) one or more tables.  The instructions of the user
must take all tables with more than 25 lines and move them to the body
in Appendix A.  For these instances, I'll need to introduce a link in
the section appropriate to the table in Appendix a.

I can imagine introducing a tableLink recurring element within each section
for the links in the table in Appendix A. I would use XSLT to parse the XML and the ferret
large tables, put the table index in my new item tableLink.
In the form, the Click event for the button tableLink would have the
setFocus method, which will be the value of the tableLink
element to build the path to the appropriate extensible in table forum
Appendix A.

Ugh.

I decided to experiment with something a little less variable.
I introduced a button in the form fragment for the article body
link to an instance of the specified section. I then used the section
fragment of a top level as a repeating subform form. I associated
a new using the setFocus method, try many different paths
variations (like. xfa.form.ItemName.MRCGroup #MRC [4] - where the MRC is the)
the name of the repeating section) to get a jump in the PDF preview of the
first to the instance 5th of the MRC, but none worked.  It doesn't throw
any error, but or not he jumps to the bottom of some pages, as planned.

Can someone help me with setFocus multiple paths to a particular build
instance of a structure repeated in a larger shape?

Take the issue to a higher level, how I will build the setFocus
path of the body in Annex A or B of annex once I assembled the
three distinct sections in a single PDF?

[Can it sounds something like: 'xfa.form.AppxA. #Table [$variable']
(where $variable is the value of the tableLink)?  Or would the
different being at the Summit as the three parts of my document will
grouped into new single PDF in assembler?

Thanks in advance.
Dan Bono

There is nothing wrong with your logic... the question is that the cursor can be placed in a field that backs do not yet exist. From the point of view of Acrobat, the field does not exist until the script that created it exits. So if you try to move the cursor in the same script as the addInstance doea then it won't work (because Acrobat is not yet registered objects). You can use AcroForm command to run a command at some point in the future. I used this technique to accomplish what you want. Here's the command:

var

setField = app.setTimeOut ("this.getField ('form1 [0].)") Page3 [0]. TextField4 [0]') .setFocus (); (', 1000);

Where 1000 is the waiting time before execution of the command in milliseconds.

Note the reference to the object in its complete form.

Paul

Tags: Adobe LiveCycle

Similar Questions

  • Save the PDF file as the name of the field in PDF format

    Hi all

    I have read this thread: https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript and I still cannot understand this.

    I want to have a custom of the button Save to my PDF form and have it save the filename with fields in my form.  The names of the fields are 'Ready', 'NameofEvent', 'EventStartmdyy '.

    so for example, the PDF is filled and returned to me with its name from default pdf as "Event application form update - 1.pdf", then I get it and click on the button, then it registers as 'DarinVegasTradeshowJune152015.pdf' and records them in a file specific to each time.

    I read on a reliable access and put it in a javascript in the folder or on my computer? My colleague and I'll be the only person to save these, only on the two machines.

    Hope you can help.

    Thank you

    I tried the following:

    The correct syntax, that I, based on the returned for 'this.path' debugger

    /HAUCACAM0007VS/shares/Marketing_bridge/Darin/'MasterTracker/EventRequestForms/1/test.PDF

    so I changed the code of this

    determine the path of the directory of the active document

    Directory var = this.path.substring (0, this.path.lastIndexOf('/') + 1);

    for this

    determine the path of the directory of the active document

    Directory var = ' / HAUCACAM0007VS/actions/Marketing_bridge/Darin /' MasterTracker/EventRequestForms/1 / '.

    and it worked.  I swear I've tried and some variations before.

    Very interesting.  I can send me this PDF file, open it without saving changes, click on save and point it to my repertoire that I wanted to.

    Yay! Solved!

    Thank you try67!

    Yet once, for the sake of people Googling how...

    ---------------------------

    I pasted this code into a text file, saved as a javascript (.js file), in the following Program Files > Adobe > Acrobat > Javascript, I also pasted into the folder where I will save the file.

    1. var mySaveAs = app.trustedFunction)
    2. {function (oDoc, cPath, cFlName)
    3. Make sure the path has trailing ' / '.
    4. cPath = cPath.replace(/([^/])$ /, ' $1 / ');
    5. try {}
    6. app.beginPriv ();
    7. oDoc.saveAs (cPath + cFlName);
    8. app.endPriv ();
    9. } catch (e) {}
    10. App.Alert ("Error during economy-" + e);
    11. }
    12. }
    13. );

    Then, I created a button, it adds a javascript script.  the "this .getField are looking for field names in my PDF,"Ready"is a field in my PDF which bears my name of sales managers, then, it adds a space beside it (+" "+), then go to the next field I want."  It saves it in order to complete the pdf, then as SalesManager EventName 1 June 2015.pdf.

    1. determine the path of the directory of the active document
    2. Directory var = ' / HAUCACAM0007VS/actions/Marketing_bridge/Darin /' MasterTracker/EventRequestForms/1 / '.
    3. If (typeof (mySaveAs) == 'function') {}
    4. mySaveAs (this, directory, this.getField("RequestedBy").value + "" + this.getField("NameofEvent").value + "" + this.getField("EventStartmdyy").value + ".pdf");
    5. } else {}
    6. App.Alert ("Missing Save function. Contact the Forms Administrator ");
    7. }

    Hope that helps anyone looking on the other to do so, it is quite easy once you know where to save the javascripts (and what to put in it), and then change another javascript code to meet your needs.

    Thank you!

  • Link to the PDF problem

    Hi all

    I'm trying to link to a PDF from my site. When I click on the link, it opens the folder I have the pdf file in and wonder of "enter the name of the file to be saved in. He has "Save as file type" and the area name. He thinks I want to save a file instead of open a. It maintains also come back in the same folder, even if I have a link with something stored on my desk. I save in jpeg format in order to make a link to it.

    I hope that I have explained quite well.  Any help would be appreciated.

    Hello

    When you bind the Project Muse PDF file, you must use the menu links in the control panel to select the link to file option. In the import dialog box that appears, browse to select the file and click open to select.

    When you browse to select a file using the link to the file function, the file becomes one of assets site downloaded when the site is published or included in the site files when the site is exported. It is advisable to copy the files you want to link from the site in the folder of the local site, as well as all the other image used in your site files.

    Please note that, depending on the browser you use and the preferences of the browser, you will see different behaviors. Some browsers will display the PDF in the browser window, while others simply download the PDF file to your desktop, where you can open it using Acrobat Professional or Acrobat Reader

    For more details on how it works and how you can link files, please see: Adobe Muse Help | Create hyperlinks

  • Linking the data with JavaScript for PDF link merge field

    Hi all

    In InDesign, I use the data merge to generate a PDF file with data from a data source file. The fusion of data will fill a product ID field. I want to write a script that changes the product number field so that it contains a JavaScript link in the PDF file.


    For example, the number of the product [1234-567] will launch: app.launchURL ("plsddr://localhost/1234-567 |") * "(, true);" When the product number link is clicked on in the PDF file.

    Can anyone provide an example of how this could be done, or point me in the right direction? If there is a better way to go about it, please let me know.

    Thank you!

    What findText returns is a list of text, but it is completely interchangeable with the word. It seems that InDesign can change at will between the characters, words, lines, paragraphs, and stories.

    Text can consist of a single SpecialCharacter (a column break, or a return or one of the SpecialCharacters enumeration) or a "String" standard JavaScript object - a simple Unicode string.

    The property that "holds" the text is 'content' - so, it all adds to 'get' the text that has been found, you will use generally

    Next = list.pop ();

    Alert ("the text content of this is"' + next.contents +' "'");

    and you can build further on it - use it as a URL HyperlinkDestination or something like that. The fixed points of point-'next' - text 'live', it was found in, so be careful not to change. Do something like

    Next.contents = "hey what happened."

    will change the text in your document. But it is also useful to add, for example, a hyperlink to the actual position on this text has been found.

    (A Council about the changes: you want to change your document, the original findText elements stressed will be ruined once you changed one!) To avoid this, work backwards from the last element found at the first. findText (true) reverses the order of the found items, from the last to the first - see JS help on that).

    Regarding

    (Also, how to print the contents of a Word object?)

    It depends on what you mean by "printing". On a printer?

  • Best practices - exeternal link a PDF file on the FM band, and in turn, HR

    I use TCS2 with FM and HR.  My goal is the following:

    -to create a doc FM (with several chapters) and links to external PDF documents. When I generate the FM file in PDF format, it correctly will allow users to click on links and display these external PDF docs.

    -import the doc FM (with several chapters) in HR and create HTML webhelp. Ideally, having the links included in the docs of FM (in external PDF) automatically generate in the HR doc, so that the produced HTML online help doc may have clicked on links also open the external PDF files.

    Issues related to the:

    -best way to do it in FM? I guess I have to create my PDFs in a portfolio (package?), so external clients keep the documentation in the same place (because hyperlinks can damage, I guess)

    -best way to make it work in HR?

    -things to watch?

    TIA!

    -Adriana

    Adrianna,

    Presents all works seamlessly in the framework, assuming that you use cross reference tools and the hyperlink correctly. Assuming that your external files are either 1.)  local for new image files or 2.) are in a static situation on a server that can be identified by a URL.

    The warnings are only external PDF files must be in the same relative location as the files FM where they are created, because the path information is used in the links, OR you must specify the static location of the external PDF as a URL using a marker rather than a cross reference hypertext.

    If you move the directories containing PDFs around after the fact, Yes, you will break things.

    (And when you generate your PDF files, it is recommended to open all the files in the book so that network errors and minor messages prevent files update targets).

    If you cannot keep the logical tree when you deliver your PDF documents, Yes, you will need to do the manual steps and create functions and so on and bind files in Acrobat format.

    It is worth it for most people to find a way to maintain the stability of the directory structure...

    See you soon,.

    Art

  • Links not transmitted to the PDF in RH7

    I have 4 Webhelp projects that generate PDF files. RH7 is supposed to keep hyperlinks in the PDF file and it did on the first volume I have converted and compiled. But the second volume is only keeps does not links, even if I have to "Add links to PDF" and "Retain hypertext links" checked in the verified Documentation Print Panel. Once the PDF file generated none of the links that are not actually the work of path. In the first draft all links between the subjects work very well... in this case, they do not. The two projects are the same age, created in RH5. This is simple text (Manual of compliance) with nothing strange. The links were all created with drag-and-drop.

    What Miss me? The first project "just done! It ' just does not work! Thanks in advance for any help!

    (This is also shown in the category other presentation of single Source... but no one seems to be posting here so I come here to help each of you with all the answers!)

    My only suggestion would be to try others and see what you get. Which might reveal something that might help to understand the issue of the #2 Volume.

    In addition, you could try of generating a Doc printed in Word first, then convert PDF Word.

    I suspect a form any corruption in #2, and you can try to create a new replacement project and re-import everything, but it would be a last resort thing.

    Good luck
    Leon

  • Link to the help file to the PDF format

    Using RoboHTML x 3, I've set up a link to a PDF file in my help file. (I don't care if the file opens in the CHM frame or in a separate target = _blank window.) When I saw using the touch of glasses, thin poster PDF file. After compilation, trying to open the PDF of the CHM, Internet Explorer cannot display the web page.

    Any suggestion would be appreciated. Thank you!

    Did you add the .pdf for your luggage? It is necessary to include it in the. chm.

    If you want it to be an external file (which is completely independent of your compiled help) then you need to treat it differently. Since the help reader navigate with absolute paths, you must use the Microsoft parser function to find an external file, even when it is in the same folder. It is documented in the Help Workshop help file. It is also in Rick Stone tips and tricks file. Let us know where the .pdf must reside - compiled in the .chm or external to him.

    John

  • Links within the pdf (preview pdf in Firefox)

    Hello

    I have a problem.

    In firefox v.41, when I saw a pdf file, if the pdf file has a links on the inside, there is no problem, but since I updated Firefox to v.42, the links do not work. In fact, when I click in the link, it does nothing.

    The problem is, I run a web site with certain standards in Spain and it is a significant problem for our users.

    The document is http://www.codigotecnico.org/images/stories/pdf/seguridadIncendio/DccSI.pdf (Page.32)

    Thanks in advance.

    Yes, I disassembled the character with the Inspector, and it works.

    I suppose it is a Microsoft Word problem.
    

    I'll try to recreate the document.

    Thank you.

  • no response from the PDF links

    Links to a PDF file displayed in a Firefox browser do not work somehow. Clicking on them has no effect. The links in the same PDF read correctly in Internet Explorer 8, and Safari 5. Also, Firefox does not display bookmarks PDF which have been set to automatically appear in the PDF properties.

    V26 of Firefox running on a Mac. Recently updated to the Mavericks, but had the same problem before that.

    It is already fixed in a future version of the built-in PDF Viewer.

    The beta version of Firefox 27 to the current address shows yet links properly using the version 0.8.641, but the current construction of 28.0a2 Aurora shows the links to annexes correctly using version 0.8.759.

    So does this mean that when Firefox 28 was released in March, it will work for users with this version of Firefox.

    It does work with the version of the 0.8.649 PDF Viewer available on the site of modules.

  • How to force the opening of the PDF with plugin even for download links?

    I would like to know if there is a way to force Firefox to ALWAYS open PDF links in the browser, rather than leaving the Web site to force the download. This isn't something related to the plugin PDF.js viewer or Adobe Reader or any other.

    Sometimes makes a link to a PDF file be opened in a plugin container in tab, e.g.: http://www.empreende.org.br/pdf/Programas%20e%20Pol%C3%ADticas%20Sociais/Governan%C3%A7a, %20accountability%20e%20responsividade.pdf

    But sometimes, it forces the PDF to download, like this: http://ojs.uwindsor.ca/ojs/leddy/index.php/informal_logic/article/download/510/473

    Can I avoid this to happen, that is, I can tell Firefox never download a PDF file, always open in a tab, as usual, regardless of the command "Download"?

    Hello alainsr, you can use the InlineDisposition addon to fix this: https://addons.mozilla.org/firefox/addon/inlinedisposition/

  • 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.

  • Why my internet stops now and then not all the time trying to upload links to pdf files

    I wonder if there is a problem with my computer or if I need to install a program? My internet stops now and then not all the time trying to upload links to pdf files.

    Hello

    1. what browser do you use?

    2. have you done any hardware changes or software on your computer before this problem?

    3. you receive an error message when internet no longer works?

    4. what exactly you mean by pdf files download links?

    If you use Internet Explorer, you can follow this link:

    Tips for solving problems when Internet Explorer hangs or stops working

    Reference: Cannot display PDFS on the web

    Display PDF files in Internet Explorer, AOL | Acrobat 3D, Acrobat Reader 7 7

    Hope the helps of information.

  • Possibility for the PDFS linked to be opened in the browser?

    Hello

    I use 9 Captivate and I wonder if it's possible for a PDF linked to open separating it into PDF format, rather than in a new browser window.

    For example, the PDF file has automatic update fields that are not updated when opened in the browser, but updates correctly when opened in Adobe Acrobat.

    Thank you

    Hello

    To my knowledge, how any linked file opens or that is completely dependent on the end-user device and how it has been configured to process regardless of the file is.

    I would be surprised to discover that you can influence exactly what happens when the user clicks on the link.

    I don't believe in other words, you can force a specific behavior.

    See you soon... Rick

  • Syntax to link to open the files in the PDF portfolio

    "Intra-porte documents" in HTML links that open the other files in the portfolio of coding.

    I'm using PDF Portfolios to distribute hundreds of customer records.  The portfolio includes an index with metadata about the files and has a hyperlink to access the file selected in the portfolio.

    I am building the index with HTML and then create the PDF with Acrobat X Pro, then including the PDF of the index portfolio with all other files.

    MY QUESTION: Which should solve the syntax to link to that would open a military record of the PDF portfolio?

    Is not available.

  • Using the link between PDFs on a local PC (not on the web)

    Hello

    I am creating a PDF with links to specific locations on external PDF.

    Web search shows that we can do this by adding pages or named destination for the link.

    My question is made of "binding" between documents on PC work local open in Acrobat (Reader) recovered himself, instead of the documents on the web and the web browser via the plug-in?

    One related answer on thread on another forum (creation of a link to a pdf to mark an another pdf - Adobe Acrobat Windows) indicates that this feature works only when the PDF file is retrieved from a web server.

    If this does not work, could someone explain the technical background?

    My client wants to use the link between the files on the PC, so I need to make my client to know why it won't work.

    Thank you.

    I think that the page you found makes it more complicated, not less. In my view, in part because there are several different problems mixed with each other.

    The easiest way to post a link to a page in another PDF file is EXACTLY the same as link to a page in the same PDF: just create a link to GO to the VIEW. It's obvious only when we know, so people often end up with alternatives that are unnecessarily complicated.

    Named destinations are complicated, but they are good if you may need to change the target file and the file source link in the right place, even if it's another page. They need careful planning and a systematic approach.

Maybe you are looking for