Newbee - question fpr scripting

Hi, I'm new to scripting Acrobat and JavaScript (besides some Web-JS), but familiar to scripting InDesign (CS to CS3 with AppleScript). Now I'm on the challenge to do some Acrobat scripting.
Please let me know, if my problem could basicallybe solved with Acrobat scripting and please give me a bit of a startup.
I want to create an image check. Distiller converts the images to PDF. So I need to access the image in the PDF and extract information like: resolution, dimensions, color space, color profile.
I expect some problems, when pixel images where placed into a vector graphic. So I need the information, that blabla.eps is vector graphic, but contains pixel images with resolution, dimension, color space, color profile.
Do I have a chance to do such a thing by scripting?
Or does anybody has some other solution to this?
Thanks
Tobias

What you are looking to do cannot be achieved through script, but could be accomplished in C/C++ as a plug-in with the freely available Acrobat SDK.
http://www.adobe.com/devnet/acrobat/

Similar Messages

  • Hi  Question On Script

    Hi Abapers,
                          I am having a question in Script how to move data from one main window to other main window...
    With Regards
    Bhaskar Rao.M

    Hi..
       U dont need to move data from one main window to another ...
      anyway a form can have onli one main window...
    If the main window of the  first page is  filled with data and still some data is there to print , then it automatically trigggers a new page ... and the reamining data will be continued on the next page's main window..
    This is the difference between the main window and Variable window.. Variable window truncates the data and it wont trigger any new page...
    <b>U can split the main window on a page into 99 multiple main windows ...
    To send the data to the next splitted window u need to use the command <u>NEW-WINDOW</u>.</b>
    i hope u understood the concept..
    reward if it helps u...
    sai ramesh

  • Interview questions on Scripts & Smartforms

    Can anyone please help me with the answers for these questions that were asked in an interview.
    1. in Scripts, I have 10 address lines there were blanks in between rows how can I avoid those?
    2. In smartforms, If  I want to transfer the data from print programme to smartform, How can I do?

    Hi
    When you create a paragraph format in SE71
    you will observe one check box for NO BLANK LINES
    just check that, it is a property of that Paragraph format..
    If you see the following code of smartform you will observe the internal tables that are passed to it and they are used in smartform
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    <b>GS_MKPF = INT_MKPF</b>
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Here in this case we are passing GS_MKPF = INT_MKPF, so this strcuture data can be used in Smartform to display the data
    Reward points for useful Answers
    Regards
    Anji

  • Question about script in sun studio creator2 and netbean6.1

    Hi, I have a quick question
    I have started a project by using sun studio creator2, the main page contains following script, it works perfectly fine.
    <script type="text/javascript">
    function getUser()
    var net = new ActiveXObject("wscript.network");
    document.getElementById('form1:hiddenField1').value = net.UserName;
    </script>
    And then I bind the field to a managed bean's property.
    However, because I need to use netbean6.1 to continue this project. I find previous script doesn't work any more. (I can get net.UserName, but I can't store the value to hiddenfield)
    I checked woodstock documentation, and guess following will do the same job
    <webuijsf:script>
    function getUser() {
    var net = new ActiveXObject("wscript.network");
    var domNode = document.getElementById('_form1:hiddenField1');
    domNode.setProps({value:net.UserName});
    </webuijsf:script>
    Once run the getUser() function, I got an "object doesn't support this property or method".
    It looks like IE security level setting problem. If it is so, because it is company setting. There is nothing I can do here.
    Any one knows workaround to store the retrived userName into hiddenfield?
    Thanks in advance!!!

    any help is appreciated

  • Question for scripting gurus: GREP search, change case make Smallcaps

    I have no knowledge of scripting at all, but this question keeps coming up during training sessions: is it possible to (java)script this:
    - Do a GREP search \u\u+
    - Change case to lowercase
    - Apply SmallCaps (or: apply character style)
    this would allow to search for acronyms and change them to smallcaps (or, even better: apply a character style with small caps and tracking)
    I know it is easy for OpenType smallcaps (do a GREP search, change to OT smallcaps) but this doesn't really change case. And some fonts used aren't OT.
    Anyone?
    Would be VERY apreciated!!

    But Harbs is a seasoned scripter who knows he'll get flamed if one of his scripts "just does not work" ;)
    Well, now that you mention it, the script is not really foolproof. It's a quick and dirty script which I threw together very quickly. It's missing any error checking, some of the variables global, and it's not in a private namespace. These are all things which could cause it to "just not work" ;-)
    Here's a more foolproof construct... (and it'll work on the current story if selected, or the whole document if there's no story selected) It will create a new character style if one does not exist and work on character styles within style groups as well. I wrapped the whole script in an anonymous function to give it a unique namespace as well.
    (function()
    if(app.documents.length==0){return}
    var doc=app.documents[0];
    // Change the following to your style name!
    var character_style_name = 'Small Caps';
    try{var range = app.selection[0].parentStory}
    catch (err){var range = doc}
    //comment out next line if you do not want styles.
    var charStyle = GetCharacterStyle(character_style_name,doc);
    app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat="\\u\\u+";
    var finds=range.findGrep();
    for (var i=0;i<finds.length;i++){
    finds[i].changecase(ChangecaseMode.lowercase);
    //comment out next line if you do not want styles.
    finds[i].applyCharacterStyle (charStyle)
    //uncomment next line if you do not want styles.
    //finds[i].capitalization=Capitalization.smallCaps;
    function GetCharacterStyle(styleName,doc){
    var charStyles=doc.allCharacterStyles;
    for(var i=0;i<charStyles.length;i++){
      if(charStyles[i].name==styleName){
       return charStyles[i];
    return doc.characterStyles.add({name:styleName,capitalization:Capitalization.smallCaps});

  • 2 Dumb Questions: Toggle Script Output tab / Set Serverouput Toggle

    I use SQL Developer quite a lot, but I need some basic help
    I'm using SQL Develeoper 3.0.04
    Question 1.
    If I ever close [X] the Script Output tab/window, I have a huge headache trying to open/unhide it again. I can't do it!
    I've looked in the menus,
    Preferences / Keyboard shortcuts etc but I just can't see it.
    So how to a make the Script Output tab re-appear? THere must be a toggle somewhere.
    Question 2.
    In a previous version of SQL developer, I used SET SERVEROUTPUT ON.
    The output from all my dbms_output.print_line statements would appear in the script output window FOR THE ENTIRE SESSION.
    In this version that I'm using, everytime I run an anon block I have to preceed the block with SET SERVEROUTPUT ON.
    It doesn't remain ON for the entire session. It only affects the next block of code that I try to execute.
    An I doing something wrong?
    Thanks for any help.
    Stu

    Welcome to the forum!
    Thanks for providing the sql developer version. Functionality can, and does, change between versions.
    >
    Question 2.
    In a previous version of SQL developer, I used SET SERVEROUTPUT ON.
    The output from all my dbms_output.print_line statements would appear in the script output window FOR THE ENTIRE SESSION.
    In this version that I'm using, everytime I run an anon block I have to preceed the block with SET SERVEROUTPUT ON.
    It doesn't remain ON for the entire session. It only affects the next block of code that I try to execute.
    >
    Have you tried using the DBMS_OUTPUT window?
    Select 'view -> DBMS Output
    Then if you roll-over the '+' sign on the DBMS Output Window toolbar you will see that it says 'ENABLE DBMS_OUTPUT FOR CONNECTION'.
    Click it and all output should display in the window.

  • Questions about scripts

    Hello,
    I'm recently learning computer science in school and I am learning how to create some scripts. I'm having trouble in creating some type of script and I was wondering if someone could help me out on it. I'm not asking for you guys to write the whole script for me but some tips on what I should look for, etc. I know most of the terminology.
    scripts with problems:
    1) Write a program that calculates n!
    2)Write a program that determines whether a given natural number is prime or composite.
    3)Write a program with three integer variables, n1, n2, and n3. Initialize two of those variables, i.e. n1 and n2, with input from the user. Then swap the values of these two variables so that the value that was originally in n1 winds up in n2 and the value that was originally in n2 winds up in n1. Note: The third variable plays an important role. If you are having trouble, first try the next problem below involving the two balls and the three boxes.
    Thanks Alot. I appreciate the help.

    1) Popular example which people would suggest you use recursion. If you want it simpler, use for loop. Google gives you tons of example.
    2) Prime is only divisible by 1 and itself. So you would look for "%" operator for finding the remainder.
    3) I think this one is pretty straight forward.
    Actually, before posting these question, any idea in your mind ?

  • Philosophical question:VB Scripts or VI calls?

    I suppose the answer to this is "depends", but I'm wondering what is the best way to do subroutines in DIAdem, VB scripts or VI calls. As one who's been programming exclusively in LV for many years I'm really weak in VB and am finding it very painful to relearn it. Are there situations where one method is preferred over the other? Can one method do things the other can't?
    George

    Hi George,
    I understand your pain with programming in a language not of your preference. The objective answer to your question, though, is that VBScript subroutines are vastly preferable in DIAdem, because the only way to use LabVIEW code is to go through the ActiveX interface and use VI server. While this works, it introduces a host of complications and potential problems.
    One such complication is passing the data back and forth from DIAdem to LabVIEW, which must be done through variant arrays in ActiveX. This is entirely unnecessary for a VBScript routine, which can reference the data in the Data Portal directly and pass "pointers" to the data when it calls DIAdem commands to manipulate the data.
    Another complication is that you often end up starting LabVIEW every time you run that G subroutine. Think about that. First of all, that makes the call much slower, second of all, it requires LabVIEW to be on any computer your application is supposed to run on. It's much more efficient and much easier to distribute your application if it contains only DIAdem-native subroutines (and dialogs).
    So much for the bad news. The good news is that this is a common request, and we are exploring possibilities to make this a more natural option in future versions of the software. No guarantees, of course, but we're definitely looking into it.
    For the time being, though, I'd recommend making full use of the VBScript recorder in the DIAdem-SCRIPT panel to help with your VBScript development.
    And you can always ask NI support for help,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Beginner's question about scripting and deployment automation

    I am new to the SAP and BusinessObjects world.  I do production support for BusinessObjects XI R3.1.  One of my functions is to deploy Universe.unv and WEBI Report files from development into QA and production.  This is currently a manual process involving downloading files and lots of key strokes and mouse clicks using the BusinessObjects Client Tools.  My question ->:  is there a way to automate this process?  Can I do this with the SAP scripting wizard?  I am familiar with many different scripting and programming languages, I just need to be pointed in the right direction.
    Thanks for your help!

    I would take a step back and learn more about the fundamentals of Flash before going farther. In the Welcome Screen of Flash Profressional there is a "Learn" section. Here are some links from it:
    Introducing Flash: http://www.adobe.com/go/fl_learn1
    Symbols: http://www.adobe.com/go/fl_learn2
    Timelines and Animation: http://www.adobe.com/go/fl_learn3
    Instance Names: http://www.adobe.com/go/fl_learn4
    Simple Interactivity: http://www.adobe.com/go/fl_learn5
    ActionScript: http://www.adobe.com/go/fl_learn6

  • Questions on scripts, tables & transfer objects between clients.

    1. In script, how to use the same print program for two different layouts? with procedure.!
    2. Why cant sapscripts be client independent.?
    3. Want to maintain a table in dev server and if i update the data, it should simultanously update in Quality and Production servers. How? please explain in details.
    4. How to transfer object between clients.? explain.
    Points will be promptly rewarded for HELPFULL answers.!

    Hi!
    3. With SE01, you can create a transport request for all table entries.
    SE01 - Create button - Workbench request - Give description and save
    Select the created request and click on Display object list.
    Click on Display - Change button
    Insert line button
    ProgID: R3TR
    Object: TABU
    Object name: Z_YOUR_TABLE
    Double click on the table name
    Insert line
    Key: *
    Save everything
    Release the transport in SE10 transaction and transport with STMS transaction.
    Regards
    Tamá

  • Question on scripting

    I had posted this in the zen3 and 4 group but havent heard an answer so im
    posting here too.
    When using a script to determine whether or not a computer has been imaged
    (new to network) if the user chooses no then reboots, it says there is no
    work to do, somehow it deletes either the mbr or corrupts the zisdata. We
    have to reboot, go into manaul mode imaging, do a zisedit -c and then start
    again.
    If the user chooses no, it should power down (halt), and next time they
    reboot, they should see the same screen. Telling them its going to be
    imaged. Does anyone know how to fix this?... i have pasted the script below.
    And part 2, when they choose N, for some reason it goes into init 6, when i
    have said init 0
    #======== Start of Script ========
    # Based on "Making a Scripted Image..."
    ZISNAME='zisview Name'
    IMGSRVR=myserverip
    #Replace with proper addon images
    echo "Warning!!! ASSUMING THIS IS A NEW WORKSTATION. THE IMAGE PROCESS WILL
    BEGIN"
    echo "If this is not a new workstation, power down and call the help desk"
    echo -n "CONTINUE Y/N ( case sensitive )"
    read AGREE
    if ["$AGREE" = "Y"];then
    if test ! $ZISNAME; then
    echo -e "No image-safe data found."
    echo -e "Assuming this is a new workstation."
    while test ! $WSNAME; do
    echo -n "Enter the workstation's name:"
    read WSNAME;
    done;
    if test $WSNAME; then
    zisedit -c
    zisedit Name=$WSNAME;
    fi
    echo "Loading Image"
    img rp $IMGSVR //$IMGSRVR/my.zmg
    mg rp $IMGSVR //$IMGSRVR/myaddon.zmg
    reboot
    fi
    else
    init 0
    exit 0
    #======== End of Script=========

    "JD" <[email protected]> wrote in message
    news:[email protected]...
    > I had posted this in the zen3 and 4 group but havent heard an answer so im
    > posting here too.
    > -
    >
    >
    > When using a script to determine whether or not a computer has been imaged
    > (new to network) if the user chooses no then reboots, it says there is no
    > work to do, somehow it deletes either the mbr or corrupts the zisdata. We
    > have to reboot, go into manaul mode imaging, do a zisedit -c and then
    start
    > again.
    >
    > If the user chooses no, it should power down (halt), and next time they
    > reboot, they should see the same screen. Telling them its going to be
    > imaged. Does anyone know how to fix this?... i have pasted the script
    below.
    > And part 2, when they choose N, for some reason it goes into init 6, when
    i
    > have said init 0
    >
    if ["$AGREE" = "Y"];then
    if test ! $ZISNAME; then
    echo -e "No image-safe data found."
    echo -e "Assuming this is a new workstation."
    while test ! $WSNAME; do
    echo -n "Enter the workstation's name:"
    read WSNAME;
    done;
    if test $WSNAME; then
    zisedit -c
    zisedit Name=$WSNAME;
    fi
    echo "Loading Image"
    img rp $IMGSVR //$IMGSRVR/my.zmg
    mg rp $IMGSVR //$IMGSRVR/myaddon.zmg
    reboot
    fi
    else
    init 0
    exit 0
    I have indented your code to make it easier to see which loops correspond to
    which loop terminations. I don't see anything immediately mismatched that
    would cause you to fall into the wrong parts of your code, but I do notice
    two things, both of which may be meaningless:
    - your main if statement isn't actually terminated. I didn't know you could
    do that; I thought the script would refuse to execute with a syntax error.
    Unless of course "exit" counts as and if termination as well.
    - I suspect you're accustomed to a real programming language because you
    have inadvertently included semicolons at the ends of some lines where you
    don't need them. This probably has no effect but couldn't hurt to remove
    them. The semicolon is intended to allow you to have two statements on the
    same line, so you need if you do for example if blah; then on one line
    because technically they are two separate commands. But you don't need them
    at the end of lines like read WSNAME.
    Just for the sake of debugging, you might want to try taking out or
    commenting out the zisedit -c line and then go through answering no. If you
    no longer have the problem with losing the image safe data, then your
    problem is indeed that you are getting to the wrong part of your code.
    Apologies if this is all stuff you knew already.
    Thanks,
    Lisa.

  • Question about scripts in repeatbel sub-form objects

    Hi,
      I am working on creating a form which has a sub-form that can be repeated as many times as the user wants to. There is an ‘Add’ button which creates an instance of the sub-form on the form, when clicked.
    On the sub-form I have 5 numeric fields say a1-a5 and 1 field say b1 which is the sum of all these 5 fields.
    On the Main form I have a 2 fields - say t1 and f1.
    The requirement is t1=f1+b1+(sub-form instance 2’s b1)+(sub-form instance 3’s b1)+ and so on …depending on as many sub-form instances there are that the user adds.
    I have created Actions using the Action Builder such that when any of a1 to a5 fields are exited, b1 will be updated with the sum of a1-a5. At the same time t1 will be updated with sum of f1 and b1.
    This works great for 1 instance of the sub-form. But when ‘Add’ is clicked and a second instance of the sub-form is added, then the script does not work as it did for the first instance of the sub-form. So for any instances of the sub-form added, when values are added to a1-a5 and the fields are existed, b1 does not get updated.
    How can I fix this?
    See attached form that I am creating for clarity.
    ‘Total Hours worked this week’ is the t1 I was talking about. See how it gets updated when values are entered in any of the hour fields. It works fine with the default instance of the T100/Strategic/Advantage Customer Information sub-form as well. But when I click on ‘Add Customer’ button to add another instance of the sub-form, it does not work as expected.
    Please let me know if it is still not clear and I can explain the issue.

    Vjay's solution works great! Essentially, take out all of your other programming on the individual fields, and hard script the field you want the sum to show on. By directly referencing the fields, Adobe is able to tell the difference between one instance and another and doesn't get them mixed up. (I have found for some of these dynamic functions, the Action Builder doesn't really work, so you need to code by hand)
    My only suggestion, would be to perhaps modify Vjay's code a little, and use Javascript instead of Formcalc. We have run into the problem where if a user is using the form from a webserver or something and hasn't actually been saved to the user PC, the Formcalc scripts won't run, only Javascript. But it all depends on how you are using your forms.
    Here is your line of code changed to Javascript, in case you want to make that change. (there's really not much difference at all)
    this.rawValue = sum(CustomerTimeBD.Row1.Cell1.rawValue + CustomerTimeBD.Row1.Cell2.rawValue + CustomerTimeBD.Row2.Cell1.rawValue + CustomerTimeBD.Row2.Cell2.rawValue + CustomerTimeBD.Row3.Cell1.rawValue + CustomerTimeBD.Row3.Cell2.rawValue + CustomerTimeBD.Row4.Cell1.rawValue + CustomerTimeBD.Row4.Cell2.rawValue + CustomerTimeBD.Row5.Cell1.rawValue);

  • Question regarding scripting OS install + applications

    I'm getting the hang of SCCM now and I thank you all who have helped greatly answering my (many) questions here.   It is really appreciated.
    One of my next questions is - can I create a task sequence that  installs both OS and applications all in a single shot?   So I can basically click one button and provision a PC from start to finish - with OS, applications and everything in one
    shot?
    Thanks
    Nathan

    Yes, you can. That's the whole idea of a task sequence.
    For some nice step-by-step guides, see:
    http://www.windows-noob.com/forums/index.php?/topic/4045-system-center-2012-configuration-manager-guides/
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Question about scripting of foreign keys

    When I script FK_SalesOrderHeader_Address_BillToAddressID key from AdventureWorks.[Sales].[SalesOrderHeader] I get this:
    ALTER TABLE [Sales].[SalesOrderHeader] WITH CHECK ADD CONSTRAINT [FK_SalesOrderHeader_Address_BillToAddressID] FOREIGN KEY([BillToAddressID])
    REFERENCES [Person].[Address] ([AddressID])
    GO
    ALTER TABLE [Sales].[SalesOrderHeader] CHECK CONSTRAINT [FK_SalesOrderHeader_Address_BillToAddressID]
    GO
    EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Foreign key constraint referencing Address.AddressID.' , @level0type=N'SCHEMA',@level0name=N'Sales', @level1type=N'TABLE',@level1name=N'SalesOrderHeader', @level2type=N'CONSTRAINT',@level2name=N'FK_SalesOrderHeader_Address_BillToAddressID'
    GO
    What is second ALTER statement for (the one highlighted with bold font)? First ALTER statement already includes WITH CHECK, so isn't the second one redundant?

    The 2nd Statement enables the Foreign Key.
    I think it is redundant because FOREIGN KEY is enabled by default when you execute the 1st statement.
    This script is generated by SSMS (Yes?), This is added just to ensure that CONSTRAINT is enabled.
    - Vishal
    SqlAndMe.com
    Yes, it is generated by SSMS 2008.

  • Newbee question - Headers Footer and menus

    What is the current, best practice for building a web site with consistent menus, headers and footers etc.
    I have read good and bad about SSI, and Dreamweaver libraries etc, and would like to know where folks in the industry turn to complete this kind of task.
    I did a really simple site with php, www.canvasdoctors.com but someone told me that how I did that was overkill and not correct.
    I hope i have been clear.
    Thanks for your time.
    Ashley

    Thanks  for the quick replies.
    Now, I was just using the canvas site as an experiment.
    And my question does not reallt relate to that site but more generically to the whole web design world.
    If you were to start a whole new site, that would have lots of content, what technology is the latest and best way of managing the properties i spoke of and would allow for easy modifications to the entire site by only editing once?
    Ashley 

Maybe you are looking for