Spawn a new PDF using Java Script within LC Designer

I am trying to spawn a new PDF file to be created from an existing PDF using Java Script within the LC designer
I have this example but I can't get it to work
function createPdf()
    pdf = pdf$();
    pdf.addText('Hello World');
    pdf.writeToFile('c:/temp/hello_world.pdf');
    window.open('file://c:/temp/hello_world.pdf');
Is it possible to create a PDF like this within LC Designer?

Hi
I would like to see if it was possible.  I thought it would be easy, as
there is a standard batch processing sequence (Print 1st page of all) using
Java that comes with Acrobat 7.  This allows you to print the first page of
a number of files that you select when the sequence is run.  Its code is:
/* Print 1st Page */
/* This sequence prints the first page of
   each document selected to the default printer.
this.print
To my uninformed mind it seemed logical that the same code, slightly
modified to print all pages, should work from within a form.
Anyway, if there is a way to choose individual files, I would appreciate
that.
Thanks
Rob

Similar Messages

  • New to Java Script(Want to open a new window using Java Script)

    Hi all,
    I am new to using Java Script. Now I have a HTML(First.html) page with a ADD button at the end of the page. What I want to know is, if I drag and select some part of the First.html and click on the ADD button a second HTML page(Second.html) should open displaying only the selected contents....
    Please help :-(

    myRef = window.open(self.location,'mywin',
    'left=20,top=20,width=500,height=500,toolbar=1,resizable=0');

  • Using java scripts for pdf

    I am trying to find a sort of tutorial on how to use java scripts for pdf files, particularly in setting up repetitive links between several pdf files.

    Here is a very nice website that has tons and tons of stuff for pdf using java script. Enjoy!
    http://www.planetpdf.com/forumarchive/forum34.htm

  • Read Text file using Java Script

    Hi,
    I am trying to read a text file using Java Script within the webroot of MII as .HTML file. I have provided the path as below but where I am not able to open the file. Any clue to provide the relative path or any changes required on the below path ?
    var FileOpener = new ActiveXObject("Scripting.FileSystemObject");
    var FilePointer = FileOpener.OpenTextFile("E:\\usr\\sap\\MID\\J00\\j2ee\\cluster\\apps\\sap.com\\xapps~xmii~ear\\servlet_jsp\\XMII\\root\\CM\\OCTAL\\TestTV\\Test.txt", 1, true);
    FileContents = FilePointer.ReadAll(); // we can use FilePointer.ReadAll() to read all the lines
    The Error Log shows as :
    Path not found
    Regards,
    Mohamed

    Hi Mohamed,
    I tried above code after importing JQuery Library through script Tag. It worked for me . Pls check.
    Note : You can place Jquery1.xx.xx.js file in the same folder where you saved this IRPT/HTML file.
    <HTML>
    <HEAD>
        <TITLE>Your Title Here</TITLE>
        <SCRIPT type="text/javascript" src="jquery-1.9.1.js"></SCRIPT>
        <script language="javascript">
    function Read()
    $.get( "http://ldcimfb.wdf.sap.corp:50100/XMII/CM/Regression_15.0/CrossTab.txt", function( data ) {
      $(".result").html(data);
      alert(data);
    // The file content is available in this variable "data"
    </script>
    </HEAD>
    <BODY onLoad="Read()">
    </BODY>
    </HTML>

  • How & where to use Java script to create new button in object detail page

    Hi All,
    I want to create "New/Add button" in object detail page. If i am not wrong i need to use java script for that but could you please let me know how & where to use Java script to create new button in object detail page in CRMOD.
    Thanks in advance.
    Regards,
    Manish

    Any related object on the detail page should have an "Add" or "New" or both buttons by default - This is vanilla functionality and will do the required action.
    If you want to modify this behaviour and do something tricky you will potentially have to go for javascript. You should add the javascript on a custom web tab on that Object.
    Admin --> Application Customization --> Contact -->Contact Web Applet
    Now, add your javascript in the code area, after you select the type = HTML for this web applet, expose this web applet on the Contact detail layout and your javascript will be invoked whenever this page is loaded.
    Check this online document to see how javascript can be embedded in CRM on Demand http://helponmyproject.com/TTOCOD/
    Cheers!
    Royston

  • Oracle apex popup using java script in tabular form select list(Am new to apex help me out... )

    Hi ...
      i have a tabular form
      have two columns in that form, kept as a select list by selecting that 1st select list data the related datas has to be popup after selecting that it has to be displayed in the  2nd column by using
    java script
    eg:
    1st column empno-----by selecting the empno the related empname has to be popup
                     dept no....by selecting the deptno the related deptname has to be popup 
    thanks in advance,
    kishore

    This is a very common question, see
    https://forums.oracle.com/thread/2359498

  • How to fetch Properties of all Survey Lists from site collection using Java Script in SharePoint 2013

    Hi,
    I am trying to fetch properties of all lists of "Survey Type" from my site collection in SharePoint 2013 using script editor web part. I am able to fetch properties of one list by mentioning its name explicitly in code but not all survey
    list.
    My task is to display Survey name , description ,Time created and URLs of all survey lists using java script in script editor web part.
    And let me know , if there is any other OOB feature of SharePoint 2013 to achieve the same. 
    Here is the code  :
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
    function sharePointReady() {
         GetSurveyList();
     function GetSurveyList() {
            var spListTitle = " List Name";
             var clientContext = new SP.ClientContext.get_current();
            var oWeb = clientContext.get_web();
            this.surveyList = oWeb.get_lists().getByTitle(spListTitle);
            clientContext.load(surveyList);
            clientContext.executeQueryAsync(Function.createDelegate(this, this.GetListProperties),Function.createDelegate(this, this.onFailure));
     function GetListProperties() {
            $("#SurveyList").text("");
            var surveyTable = "<table border=1>";
            surveyTable = surveyTable.concat("<tr><td>Survey Name</td>");
            surveyTable = surveyTable.concat("<td>Survey Description</td>");
            surveyTable = surveyTable.concat("<td>Time Created</td>");
            surveyTable = surveyTable.concat("<tr><td>" + surveyList.get_title() + "</td>");
            surveyTable = surveyTable.concat("<td>" + surveyList.get_description() + "</td>");
            surveyTable = surveyTable.concat("<td>" + surveyList.get_created().format("MM/dd/yyyy hh:mm tt")+ "</td>");
                 surveyTable = surveyTable.concat("</table>");
            $("#SurveyList").append(surveyTable);
        function onFailure(sender, args) {
            alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    <div id="SurveyList"></div>

    Shifa,
    Please use search result webpart or content query webpart to list all survey list.
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to pass parameters to a page invoked using java script.--- Very Urgent.

    Hello,
    I have an advanced Table in my page. In the first column there is a
    messageChoice. In the second column there is link item.On the link item i have set the following value for destination uri.
    javascript:var a=window.open('OA.jsp?page=/AutoSales/oracle/apps/per/auto/webui/AutoSurrogatesPG&retainAM=Y','a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbar=yes'); a.focus();
    The user selects a value from the message choice and when he clicks on the link item, the value selected from the list should go to the new page invoked using java script as a parameter. I need the value selected from choice to generates few fields in the new page. I have preferred java script because i need the base page and a model window should open. I have tried using setForwardUrl() and setting '_blank' and new window for target frame property on the link item. But it isnt working. The new page is opening in the same window.
    I have also tried putting the value in a session.
    Please help with any kind of suggestions or solutions.
    Thank you.

    Uma,
    You need to
    - Have a PPR Action on the messageChoice (this would trigger a form submit to populate the underlying View Attribute)
    - Either
    - Retrive the value from the View Attribute in the pop-up page (as I could see that you are retaining the AM)
    - Use a SPEL in the link (on the modal page) to use the value from the View Attribute as the parameter value (in the form ${oa.current.<ViewAttributeName>)
    HTH

  • How to pass values to variables in WAD 7.0 using java script

    Hi.,
    My requirement is based on WAD 7.0.
    The sales value has to displayed in WAD using graph with various chart types.
    I have created variables for plant and material group in a query.
    I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
    Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
    Kindly help me how to use java script to get the values from FORM and pass it to variables.
    Regards,
    Selva

    Hi Selva,
    You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
    Please configure Action on the ButtonGroup webitem to use 'Commands'.
    ->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
    ->Set Display Variable Screen setting to OFF
    ->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
    ->Repeat above steps for Query Variable Material Group
    Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
    --Priya

  • Display pop ups in the jsp by using Java script

    Hi
    can any body say ,how to display pop ups in the jsp by using Java script ?

    that's correct. You can use the below code for AJAX request.
    <script type="text/javascript">
    var httpObject = getHTTPObject();
    //create XMLHttpRequest object
    function getHTTPObject() {     
         var xmlhttp;
         if (window.XMLHttpRequest) // if Mozilla, Safari etc
              xmlhttp = new XMLHttpRequest();
         else if (window.ActiveXObject){ // if IE
              try {
                   xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
              catch ( e ){
                   try{
                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                   catch ( e ){}
         return xmlhttp;
    //define the function to send the request
    function sendRequest(){
        var currDesc = document.getElementById("description").value;
        var URL =  "manageMaintAction.do"; //action mapping in your struts-config
        var queryString = "currDesc="+escape(currDesc); //get the currDesc value in your action class like request.getParameter("currDesc")
        httpObject.open( "Post", URL, true );
        httpObject.onreadystatechange = cbFn;
        httpObject.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded");
        httpObject.send(queryString);
    //callback fn
    function cbFn() {
        if (httpObject.readyState == 4)
             if (httpObject.status == 200)
              var result = httpObject.responseText;
              alert(result);
    </script>

  • Acrobat standard 9.0 error while enabling commets option using Java script object

    I'm using the below java script code in my VB 6.0 application for enabling commets options in the PDF file
    Dim oJSO As Object
    Set oJSO = mPDDoc.GetJSObject
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    It is working fine till Acrobat 8.0. Now I'm trying with Acrobat 9.0 standard edition, it is throwing scripting error 'An unhandled Win32 exception occured in Acrobat.exe[308].
    Can anyone suggest the way to enable 'comment' options in Acrobat Standard 9.0 using Java Script Object?
    Thanks

    I get much the same problem with VB6, Acrobat 9 Pro and WinXP SP3. When I single step the line:
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    in debug I go to the error handler for my Sub. Inspecting the VB Err object has Number = -2147417851 and Description = "Automation error
    The server threw an exception." I get a Microsoft crash notice about Acrobat a short while later.
    I've experimented with the JavaScript debugger in Acrobat and you can execute Collab.showAnnotToolsWhenNoCollab = True and reference the value of Collab.showAnnotToolsWhenNoCollab in the console. The problem appears only when accessing Acrobat Javascript through the Interapplication Communication API.
    If anyone can help it would be appreciated. I tried Adobe's Acrobat support and they were no help at all.

  • Adobe Form : detect page break using java script

    Hi,
    How can we detect a page break at a runtime using java script? I need to display a data in internal table at header and unique for a document number. i've 10 order list which has multiple items, each of the orders are printed in a new page and i wanted to know this event using a java script which could help me to add some additional logic at header.....pls can someone help on this?

    Hello Prabhu,
         From your doubt, what I understand is that, You have designed a header in Master Page. You need to fill this header using the Item table which is already designed in the design view(body page). Means you want to fill the Item details(which are in body page) into the header(which is in the master page).
    To read the contents from body page into master page, you need to write Javascript code on the header fields(which is in the master page) in the Layout Ready Event.
    For example, if you want to fill the field Order_description in header(master page) from the column Order_Description which is in the Item table(body page)
    In the form layout, select the order_description field and in the event READY LAYOUT write the below JavaScript code.
    var currpage = xfa.layout.page(this);------> Get the current page
    var fields = 0;------> Variable to store the number of fields in that page.
    fields = xfa.layout.pageContent(currpage-1, "field", 0); ------> Get the number of fields
    for ( i=0; i<= fields.length-1; i++ ) ------> Loop on each field on the page
        if ( fields.name == "ORDER_DESCRIPTION" ) ------> Check if the corresponding field is in the Item table
             this.rawValue = fields.item(i).rawValue; ------> Assign that value in the Header field
    Repeat the same steps for other fields in the Header. This will work for all Purchase Orders spanned across multiple pages.

  • Not able to produce some Czech characters in pdf using java.

    Hi All,
    I am not able to produce some Czech characters like ě and č in pdf using java. Can you please guide me what could be the cause. The characters are coded in properties file and its just neglecting č and ě and taking other character next to it.
    we have used below code to display the characters but its also not working..first we thought its font issue since Helvetica dont come by default in windows but after putting helvetica font also we are not able to produce the characters.
    BaseFont baseFont = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1250, false);
                   Font fontStyle = new Font(baseFont, 12, Font.NORMAL, Color.BLACK);

    baftos wrote:
    4th paragraph at http://download.oracle.com/javase/6/docs/api/java/util/Properties.html explains it.
    Note also that Java 6 allows you to produce properties files in encodings other than ISO-8859-1, provided you load them via a reader with a matching encoding. (Also see that link posted by baftos.) This might be more practical then the Unicode encoding which was required in earlier versions of Java.

  • Can we use Java Script in SAP BusinessObjects Web Intelligence 4.1?

    Can we use Java Script or any other Script in BI 4.1 Web Intelligence? If possible please do let me know the method/process

    Hi Kranthi,
    You have option to read a cell content as html. else you will have to go for SDK. I think you will get better suggestions, if you can explain your requirement in a little detailed manner.
    refer below links for more details about SDK.
    http://bukhantsov.org/2013/04/how-to-create-a-webi-document-using-java-report-engine-sdk/
    Regards,
    Nikhil Joy

  • How to print a Pdf from Java script

    Hi,
    I need to print a pdf from java script. In java script i have url of pdf. Is there any way to print pdf from java script?
    I am able to print word doc by ActiveX. is there any activeX or something else which do the same thing for pdf?
    Any help heartily esteemed to me.
    Thanks
    Kamlesh Sharma

    you are cross postin .. your thread has been answered in the jsp jstl forums

Maybe you are looking for

  • Using mdb  in OAF

    Hi all i want to use mdb in an Application that i wil buit in oAF . so database connection is required . can anyone help me out in establishing this connection. what kinda driver shud i choose.i believe it shud be third party jdbc. pls correct me if

  • X-Raid question about adding more drives

    Hi Guys. I am running an X Server (10.3.8 dual 2GHZ PPC G5)with an X-Raid attached. Right now it is only half full with a RAID5 volume that is my main file server. My question is can i add three 500GB drives into the empty slots of my X-Raid and cong

  • IPhone 5 shut down and restore problems

    I was using my iPhone 5 and it was at about 6% so I shut it when I went to go plug it in it wouldn't turn on for a while, I tried many different chargers. Then at once it started to turn on the apple sign shows up and it appears to be turning on the

  • Migration from Sybase 11.9.1 to Oracle 7.3.4

    Does the Oracle Migration Workbench 1.2.2 support database migration from Sybase 11.9.1 to Oracle 7.3.4? If not, is there any work-around or any other tool? Can we still use Migration Workbench for this migration? Thanks.

  • ODI performance issue

    I am trying to load 5,00,000 records from Flat file to SQL Server. I am using SUNOPSIS MEMORY ENGINE as staging area. Using LKM File to SQL and IKM SQL to SQL Append KMs and heap sizes ODI_INIT_HEAP=32m ODI_MAX_HEAP=256m The process hangs or takes a