Getchar() and putchar() in adobe javascript

One of the simplest programs that are written in C for newbies is pure input  and output of characters from pressed keys in succession (with some max  repetition allowed by the operating system settings for key pressed for extended  period).
#include <stdio.h>
main(){
int c;
while ( (c=getchar()) != EOF)
     putchar(c);
I want to write a similar minimal program in acrobat  javascript.
The script may be document/application level ... most preferably not attached  to any specific field on any page and listens for the Keystroke ... ie a pressed  key.
However, if it MUST be attached to a field ... then that field would be a  button field which is on the current page and in focus ... but this will take  away the simplicity I desire and as exhibited in the C program above which  compiles and works.
I want to print the letter corresponding to the key pressed on the console  using this statement or another ...
console.println(c);
[QUESTION] How do I read the key pressed ?
Thanks,
Francis Fukuyama
Re: getchar() and putchar() in adobe  javascript
as a newbie i did lots of search in the sdk and guide before asking this  question.
i need acrobat to do events globally irrespective of page based on what key  is pressed in certain contexts so it should not interfere with other normal  operations.
alternatively, i need three of four modifiers of mouse events but  nothing is more convenient on the fingers than pressing a key like y/n for  yes/no .
Are there any non-reserved keys or non-reserved clicks events that can be  recorded at the global, application or document level, or else be intercepted by  a button and then recorded in some kind of file or hidden field for that button  and then automatically "recorded or downloaded" into a text file as a data ?
Thanks again for any help.
Francis
George Johnson
1,505 posts since 
Aug 11, 2002
2. Dec 17,  2010 11:03 PM in response to: FrancisFukuyama
Re: getchar() and putchar() in adobe  javascript
You would have to create a custom plug-in to have any hope of accomplishing  this. JavaScript cannot do what you describe. You might want to pose this  question in the Acrobat SDK forum here if you haven't already.

Francis,
The SDK documentation is sufficient, I learned plugin development just from reading all the relevant documents. The SDK comes with sample plugins that you can use to start your own project.
However, your development environment will not be sufficient to develop Acrobat plugins: you need Visual Studio on Windows and XCode on the Mac. Which version is necessary depends on which version of the SDK you are using.
The PDF reference is the document that describes The PDF file format, and is necessary if you want to access information in a PDF, add to, or modify a PDF. Since the PDF format is no longer owned by Adobe, but is now an international standard, that document is available as ISO32000 through ISO, but you can still find the previous version on Adobe's web site.
Plugin development is complicated, don't expect to learn it in an afternoon or a week or even a month.
Karl Heinz Kremer
KHKonsulting LLC
PDF Acrobatics Without a Net
[email protected]
http://khkonsulting.com

Similar Messages

  • Adobe Javascript MAC and PC

    We are programming an application using Adobe' s javascript.
    The resulting PDF needs to cross platform compatibe ( ie be able to be view on PC's and MAC) with the javascript functioning.
    If there a differnce in programming needs for javascript to function in both PC and Mac readers?
    If so can anyone point me to any Adobe documentaion that offers infomration on that.

    There are some differences, but not many.
    You can find the reference here: http://www.adobe.com/devnet/acrobat/javascript.html
    (ps. In the future, you're more likely to get an answer to such questions if you post them on the Acrobat Scripting forum)

  • Adobe Javascript buttons does not work after deploying by ADS

    Hi,
    I have a dynamic PDF with adobe javascript " addInstance (1) ". In the preview of Adobe Lifecycle the PDF works like it should. However when I deploy the PDF in Developer studio the button is working anymore. It looks like the PDF isnt dynamic after deployment.
    I have tried to add the following code , but it isnt working:
    IWDInteractiveForm iForm1 = (IWDInteractiveForm)view.getElement("InteractiveForm1");
    iForm1.setDynamicPDF(true);
    Also, the properties of the PDF is set to Interactief Form, and XDP preview format is Dynamic PDF.
    Does anyone know what the problem is?
    Thank in advance.
    Thaibinh
    Application details:
    Acrobat Reader 7.0.9 and higher
    Adobe Live cycle 7.1
    Developer studio S 7.0.13
    AdobeControl version  6.3018.0.1
    Type browser Internet Explorer 6.0
    Operation system Linux
    Type of interact form ACF
    Netweaver 2004s

    Hi Harman,
    Am i inserting the code at the correct spot?
    //@@begin javadoc:wdDoModifyView
    Hook method called to modify a view just before rendering.
    This method conceptually belongs to the view itself, not to the
    controller (cf. MVC pattern).
    It is made static to discourage a way of programming that
    routinely stores references to UI elements in instance fields
    for access by the view controller's event handlers, and so on.
    The Web Dynpro programming model recommends that UI elements can
    only be accessed by code executed within the call to this hook method.
    @param wdThis Generated private interface of the view's controller, as
           provided by Web Dynpro. Provides access to the view controller's
           outgoing controller usages, etc.
    @param wdContext Generated interface of the view's context, as provided
           by Web Dynpro. Provides access to the view's data.
    @param view The view's generic API, as provided by Web Dynpro.
           Provides access to UI elements.
    @param firstTime Indicates whether the hook is called for the first time
           during the lifetime of the view.
      //@@end
      public static void wdDoModifyView(IPrivateInfosessieenqueteView wdThis, IPrivateInfosessieenqueteView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
         if (firstTime) {
         IWDInteractiveForm iForm1 = (IWDInteractiveForm)view.getElement("InteractiveForm");
         iForm1.setDynamicPDF(true);
        //@@end

  • How to create a pop up calendar in adobe acrobat or any other adobe tool  via adobe javascript  ?No third party tools needed(Eg:formrouter)

    I want to create a pop up calendar in adobe acrobat or any other adobe tool  via adobe javascript  in a PDF form .
    I wish to create the calendar without any third party tool.
    I found few options like formrouter and also pdf scripting.
    But I was to create the calendar via pure Adobe Javascript. If no such option is there  inbuilt pop up calendar control in any adobe tool to design the PDF form and afterwards save the same as PDF.

    All 3 of the options provide are all JavaScript. There is no plug-in used. You do need to place the JavaScript code text file into a special folder so that the menu and tool bar tools that allow execution of the JavaScript code and associate the pop-up calendar with a specific field.

  • Comments Enable for Commenting and Analysis in Adobe Reader...

    How to run the "Comments >> Enable for Commenting and Analysis in Adobe Reader..." through Javascript or Plugin...
    Thankzzzzz

    This is possible with following  server product:
    http://www.adobe.com/products/livecycle/readerextensions/

  • How can I disable Select Tool & enable Hand Tool using Adobe JavaScript ?

    How can I disable Select Tool & enable Hand Tool using Adobe JavaScript ?
    I want wherever the PDF opened automatically preferrence changed, default HAND TOOL remain selected. I want to do it using Adobe JavaScript.

    You are correct in that it's not functioning, however I do not have that option under the "online and adobe online" section in Adobe Customization Wizard XI.  I have the following boxes that can be checked:
    "Disable initiating shared reviews and data collection via distributed forms using Adobe online services (does not affect non Adobe online services reviews and forms).
    "Disable the Tools pane in Reader"
    "Disable file storage on Adobe online services"
    "Enable file storage even when all other services are disabled"

  • Adobe Javascript from within Excel VBA

    I have some limited experience with Excel VBA and Adobe Javascript separately, but have never tried to put them together. I am rather baffled by the use of “DoJavaScript” from within Excel VBA. I have a number of Illustrator JavaScripts that do various tasks (mostly measure and set properties on illustrator drawing objects to determine some geometric metrics). I wanted to run these scripts from within Excel VBA (they run without problem when directly called into Illustrator). My hope was to pass a few real numbers from VBA into the JavaScript before one ran to set some run parameters and then get a few real numbers back out from the JavaScript back into VBA. I cannot seem to get even the simple DoJavaScript command given in the Adobe VBscript reference to run. Reading other posts that seem somewhat related it is not clear if I am doing something very simple wrong, or if my understanding of the use of the DoJavaScript command is misguided. Anyone able to shed some light on this?
    My last try was this simple test...almost directly from the Adobe reference:
    Private Sub SetScale_CommandButton1_Click()
    Set appRef = CreateObject("Illustrator.Application")
    Set myNumberOfDocuments = appRef.DoJavaScript("documents.length;")
    MsgBox myNumberOfDocuments
    End Sub
    I am really hoping to be able to run javascripts that are a few hundred lines long....but if I cannot even get something simple to go then I am about to give up on it.
    Thanks for any suggestions

    Carlos;
    I am most grateful! ... I was stumped on that for hours, thought I had tried about every combinatory possible, and was about to give up on getting the DoJavaScript  method to work. There are few examples of this on the web, so for anyone else who would like a bit more verbose  example I post below is a simple VBA sub-routine that uses a javascript function to return the number of selected objects in the current active illustrator document and displays that number in a message box in excel. Simple example, but it was the sort if thing I was looking for all over the web before Carlos’ help.
    Cheers,
    Brian
    Private Sub ObjectNum()
    Set appRef = CreateObject("Illustrator.Application")
          tmp$ = "function myfunction() {"
          tmp$ = tmp$ + "var idoc = app.activeDocument;"
          tmp$ = tmp$ + "var sel = idoc.selection;"
          tmp$ = tmp$ + "var numobj = sel.length;"
          tmp$ = tmp$ + "return numobj;};"
          tmp$ = tmp$ + "myfunction();"
    numobj = appRef.DoJavaScript(tmp$)
    MsgBox numobj
    End Sub

  • Shantanu Narayen, President and CEO of Adobe

    Here is some general information about the history of Adobe for new users. But later on quotes from Shantanu Narayen, President and CEO of Adobe.
    1) In 2005 Adobe buys Macromedia:
    "On April 18, 2005 Adobe Systems announced a definitive agreement to acquire Macromedia in an all-stock transaction valued at approximately $3.4 billion."
    Great! Just buy out competitors and add their programs to your portfolio:
    ColdFusion, Flash, Fireworks, Dreamweaver.
    2) In 2009 Adobe buys Omniture
    Shantanu Narayen led the $1.8 billion acquisition of Omniture, Inc.
    In a press release, Adobe's president and CEO Shantanu Narayen called the deal a "game changer for both Adobe and our customers"
    There is no denying that. Adobe knows how to change the game. Usually without any warning or consideration to the end user whatsoever.
    Quote from Shantanu Narayen:
    "When you think about digital media, Adobe is already the largest provider of tools and services for the creative community. Everybody is re-tooling for the future of web - devising strategies for new and multiple screens (television, mobile, tablet/PC)and app stores. With devices like photoshop touch and cloud-based services, we are aggressively moving towards that shift."
    Adobe? Agressive? No, no, no. You must be thinking of a different Adobe.
    wikipedia.org:
    "Critics have accused Omniture of attempting to hide the fact they are collecting data. Critics claim they do this by sending the information to a domain name that looks and sounds similar to an IP address used to connect to devices on the local network and not the Internet. This has led to speculation that the domain name is used to trick users or firewall rules."
    Sounds like something Adobe would want to own alright.
    3) In 2012 Adobe buys Behance
    Quote from the Behance blog:
    "Our mission to connect and empower the creative world is getting a big boost today. Our team is thrilled to join Adobe and take Behance to the next level. We’ve been given an opportunity to influence creative work, careers, and the creative industry on a grand scale, and we intend to do just that."
    Sigh, please don't. just don't. We are being influenced enough as it is.
    Quote from Shantanu Narayen (December 2012):
    "I'm pleased to report we delivered record revenue of $1,153,000,000 in Q4. This performance helped us achieve record revenue of $4.4 billion in fiscal year 2012."
    At the very high expense of customer satisfaction and loyalty. Time will tell how strong your monopoly really is.
    Shantanu Narayen:
    "At Adobe, we're focused on 2 large market opportunities: Digital Media and Digital Marketing. 2012 was a milestone year in terms of innovation with our Creative Cloud and Adobe Marketing Cloud. We achieved great success in both these areas."
    Shantanu Narayen:
    "Adobe is changing how we provide value to a broader set of customers. We will deliver customized offerings for individuals, workgroups and large enterprises. As with all successful subscription services, we're offering a free trial program. This enables an easy on-ramp and a funnel of prospects that we intend to convert to paying subscribers."
    Turning us into future Cloud drug addicts, The first one's always free! Thanks Adobe!
    "We have begun transitioning enterprise customers to enterprise term license agreements, which provide them cloud services and updates to our desktop tools. Pricing for each segment is designed to reward loyal customers and aggressively transition them to the cloud."
    Once again. Adobe? Agressive? Surely you jest!
    "An advisory agency, Brendan Wood International, had ranked the 'Top Gun CEOs'  for 2009 based on their ability to make smart acquisitions, make themselves visible and expand the company's value propositions, among other things."
    "Shantanu Narayen has been in the industry for a very long time and always has a strong sense of what the next key steps are in terms of positioning the company in the industry."
    Yeah well, I guess you can't always be right.
    "When Adobe announced in 2003 it was introducing product "collections and suites", customers and industry watchers wondered about Adobe's motivations. Was it all about money? Ultimately Adobe's Creative Suite of products became the standard.
    Narayen anticipates a similar kind of embrace for Adobe CC. "A few years from now, people will say, 'How could I even imagine a Photoshop that was not connected to the cloud?'"
    Dark times ahead indeed if that happens.
    Quote from Shantanu Narayen - May 2013:
    "And finally, in monetization, whether it's video that's going to increasingly move to IP networks, whether it's physical retailers who are increasingly moving their business online, I think the more we can transact business and close the loop with respect to monetization, we think that, that's a big opportunity available for us as Adobe."
    Yes, having a monopoly sure is awesome. Not having to deal with those pesky free market systems.
    Shantanu Narayen:
    "A strategy that we outlined over a couple of years ago is really through the combination of what we call the Creative Cloud and the Marketing Cloud, to really have a complete solution that provides this integrated platform across the entire content life cycle."
    In other words, Adobe will get its greedy little hands on everything we could possibly want to do. And aggressively force us to go along with it.
    And finally a quote from Steve Jobs when talking about a music subscription service:
    “I think you could make available the Second Coming in a subscription model and it might not be successful.”
    Let's face it. This 'Cloud scheme' is all about the money. It has no real extra value to us, the ''valued and loyal customers'. The only way to possibly change this as some other users have said on this forum is to vote with your wallet. That's the only thing that matters to the people at the top of Adobe. Money money money.
    Customer satisfaction? Adobe doesn't care. Customer loyalty? Adobe doesn't care. And the sad thing is. Eventually we will tire from complaining and just conform to this sad new reality...

    You are not viewd by anyone at Adobe as anything but $$$$$$$$$$$$$
    Your art your soul or anything else do not matter what matters is $$$$$$$$$$$$$$
    From Adobe to wall street
    current and thereby driving higher average revenue per user. Additionally, our shift to a subscription model will increase the amount of recurring revenue that is ratably reported, driven by broader Creative Cloud adoption over the next several years.
    To assist with the understanding of this transition and the related shift in revenue described above, we are using certain performance metrics to assess the health and trajectory of our overall Digital Media segment.
    These metrics include the total number of current paid subscriptions and Annualized Recurring Revenue ("ARR"). We define ARR as the sum of:
    � the number of current paid subscriptions, multiplied by the average subscription price paid per user per month, multiplied by twelve months; plus,
    � twelve months of contract value of Enterprise Term License Agreements ("ETLAs") where the revenue is ratably recognized over the life of the contract.
    In addition, we expect renewal rates associated with Creative Cloud, and potentially other subscription offerings, will become key metrics used to measure their performance. Because the majority of Creative Cloud subscriptions have been annual and the Creative Cloud launched in May 2012, we have not yet reached the first anniversary of these annual subscriptions and, therefore, we anticipate that meaningful data regarding subscription renewal rates will first become available later in fiscal year 2013.
    CRITICAL ACCOUNTING POLICIES AND ESTIMATES In preparing our Condensed Consolidated Financial Statements in accordance with accounting principles generally accepted in the United States of America ("GAAP") and pursuant to the rules and regulations of the SEC, we make assumptions, judgments and estimates that affect the reported amounts of assets, liabilities, revenue and expenses, and related disclosures of contingent assets and liabilities. We base our assumptions, judgments and estimates on historical experience and various other factors that we believe to be reasonable under the circumstances. Actual results could differ materially from these estimates under different assumptions or conditions. On a regular basis, we evaluate our assumptions, judgments and estimates. We also discuss our critical accounting policies and estimates with the Audit Committee of the Board of Directors. We believe that the assumptions, judgments and estimates involved in the accounting for revenue recognition, stock-based compensation, business combinations, goodwill impairment and income taxes have the greatest potential impact on our Condensed Consolidated Financial Statements. These areas are key components of our results of operations and are based on complex rules requiring us to make judgments and estimates, so we consider these to be our critical accounting policies. Historically, our assumptions, judgments and estimates relative to our critical accounting policies have not differed materially from actual results.
    With the exception of the discussion below, there have been no significant changes in our critical accounting policies and estimates during the three months ended March 1, 2013, as compared to the critical accounting policies and estimates disclosed in Management's Discussion and Analysis of Financial Condition and Results of Operations included in our Annual Report on Form 10-K for the year ended November 30, 2012.
    Recent Accounting Pronouncements

  • Adobe Reader could not open (title and number of Adobe digital Editions EPUB book)because it is eith

    I've tried downloading digital books from both my public library and from the Adobe site. iI always get the above message.
    previously i downloaded aone with no trouble. So i know I have the correct software on my computer.

    Michael,
    I don't understand.
    Previously the Adobe Digital Editions software I installed on my computer
    did open an EPUB book.
    Now I get this Adobe Reader error message.
    What gives?
    Thanks,
    jim

  • If I have my product code and cd for Adobe Creative Suite 5 can I obtain the serial number?

    If I have my product code and cd for Adobe Creative Suite 5 can I obtain the serial number? I had the serial number on my college email which I can't access now that I've graduated.

    adobe support might be able to help you,
    contact adobe support, https://helpx.adobe.com/contact.html

  • How do I unsubscribe from Adobe Creative Cloud and cancel my Adobe ID? I tried going to "Cancel my membership" on their site but it just takes me in a full circle and I end up back at "Cancel my membership" again.  Is this a ploy to not let go of potentia

    How do I unsubscribe from Adobe Creative Cloud and cancel my Adobe ID? I have tried numerous times going to "Cancel my membership" on their site but it just goes through several steps and ends up where I began (i.e. Cancel my membership). Why is it so difficult to unsubscribe? Thks for any advice. Lavandula

    Adobe contact information will not help You. The Finnish sites are making the same loop. The worst thing is that they have send me e-post telling that my membership will continue after first year automatically with 60 % higher price. I don't need do anything I will not continue the membership. It seems impossible to end it. The onlys solution seems to be close the credit card.

  • My hard drive crashed and I am trying to download and re-install Adobe Acrobat 9 Standard?

    My hard drive crashed and I am trying to download and re-install Adobe Acrobat 9 Standard since I don't want to pay for another license.  I tried downloading Adobe Acrobat 9 Pro and when I entered my software key, it came back invalid.
    Please HELP

    you need to dl acrobat 9 standard.
    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7 win | 8 mac | 7 mac
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
    Lightroom:  5.7.1| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5.5, 5 | 1
    Contribute:  CS5 | CS4, CS3 | 3,2
    FrameMaker:  12, 11, 10, 9, 8, 7.2
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • I reinstalled operating system software on my MacBook Air (Yosemite 10.10.3) and tried reinstalling Adobe Acrobat 9 Pro.  I was able to install the software into my Applications folder but I was unable to enter the serial number or go any further with the

    I reinstalled operating system software on my MacBook Air (Yosemite 10.10.3) and tried reinstalling Adobe Acrobat 9 Pro.  I was able to install the software into my Applications folder but I was unable to enter the serial number or go any further with the installation.  When I click on the Adobe Acrobat icon in the Applications folder, nothing happens.

    Hi Tom,
    kindly check the System requirements | Acrobat family of products—older versions (XI, X, 9)
    For serial number message try: 
    Error "Invalid serial number" | Acrobat 9 | CS4
    Thanks,
    Atul Saini

  • Acrobat 7, needed with FrameMaker 7: How do I get and install an "Adobe PDF printer instance?"

    In FrameMaker, when I try to save a FrameMaker file as a PDF file, I get the following message: "FrameMaker could not find Adobe PDF printer instance, which must be installed to execute "Save as PDF" command".  I have a sinking feeling that I deleted that printer instance from my list of printers, thinking I did not need such a printer. I have tried uninstalling and reinstalling FrameMaker 7, Acrobat 7 and Reader 9. All reinstalled successfully, EXCEPT still no Adobe PDF printer instance. Thus my question: how do I get and install that Adobe PDF printer instance?
    .( I am using a new computer. I still have my old computer available, with the Adobe PDF printer instance on it. If I could find where in the old machine (Windows XP)  the files are for it, I could copy them to the new machine).
    Thanks in advance  for any advice.

    Just curious,
    What is the new machine's OS (& is it 32-bit or 64-bit)?
    Be well...

  • I am having trouble with the Jpeg icons and also now thumbnails not being visable in bith teh Apple finder and now also Adobe Bridge. Can anyone shed any light on this ?

    I am having trouble with the Jpeg icons and also now thumbnails not being visable in bith teh Apple finder and now also Adobe Bridge. Can anyone shed any light on this ?

    Argh - once again, I find my solution right after posting this. Left out one modification to the SWIG script, now it runs in 29 seconds vs C 16 seconds, I can live with that.

Maybe you are looking for

  • How do i recover from a total lockup

    My Mac Mini running Snow Leopard locked up last night. The external touchpad moves the cursor but seems to have lost click capability. The keyboard seems to work. I shut it down using the hardware switch on the back, but when I turned it on again tod

  • Photoshop CS4 error since Mavericks when open file from Server: "file is empty"

    Since I upgraded to Mavericks I can't open files directly from a Server (smb://..), it says "file is empty". When I copy the PSD file to my local drive I can open it though. I tried already to remove the server and reconnect. I'm using the CS4. Any i

  • Mapping lookups - API (SP13)  :-)

    Hi, just want to let you know that there's some "practical info" about mapping looups on SDN RFC API (an article which I posted a week ago) https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/801376c6-0501-0010-af8c-cb6

  • Shuffle-function in music player

    I recently bought the N8 and after spending a few days of tagging and downloading album art hours I finally managed to successfully transfer my mp3 library over to the phone with minimal errors occuring. However, one thing that gives me a headache is

  • Restore from backup gives a cryptic error - help please!

    Hi, I have a iPhone Classic (pre 3G), with Software v 2.0 I wanted to get back some files that an application created (recorder) which got erased on upgrading the application! So, I did a restore from backup operation via iTumes v 7.7 My phone is res