Alpha DevCon 2018
Results 1 to 8 of 8

Thread: actionjavascript PDF file location

  1. #1
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,040

    Default actionjavascript PDF file location

    I am trying to use actionjavascript to open a pdf in the session folder,
    but I can't seem to format it correctly.

    Can someone point me in the right direction ?

    Thanks much,

    Gregg

    actionjavascriptPDF.PNG

  2. #2
    Member
    Real Name
    Pevisha Joshi
    Join Date
    Jul 2014
    Location
    Vancouver, Canada
    Posts
    53

    Default Re: actionjavascript PDF file location

    Hi Gregg,

    If you have the pdf file already published on to your application server, in the filename field you just enter the name of your file e.g: sample.pdf.

    Pevisha

  3. #3
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,040

    Default Re: actionjavascript PDF file location

    Hi Pevisha,

    I appreciate your time and effort with this issue.
    A published pdf would be great if it never changes, or in the alternative, if the same one is useful for everyone at the same time.
    I am looking for a way to use dynamic pdfs, where the data in the pdf could change often.

    Gregg

  4. #4
    Member
    Real Name
    Pevisha Joshi
    Join Date
    Jul 2014
    Location
    Vancouver, Canada
    Posts
    53

    Default Re: actionjavascript PDF file location

    Hi Gregg,

    If you are trying to change the content of the pdf dynamically - I have tried using creating report using custom data type. And passing the JSON data to the part of the report that changes often. The report can be published as a PDF. You can create argument to pass to report so depending on the input you can create logic to choose different part of JSON data.

    This is very indirect way of creating PDFs but it works.
    I have created an example of it, hope it helps you. I couldn't attach the zip file here so I have uploaded it to one drive.
    Link: https://1drv.ms/f/s!As57Pfk79EdJhUoDHv0XRoew-sfi

    Pevisha

    https://1drv.ms/f/s!As57Pfk79EdJhUoDHv0XRoew-sfi

  5. #5
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,040

    Default Re: actionjavascript PDF file location

    Hi Pevisha,

    I have tried to view the report but receive the error shown below.

    Capture.PNG

  6. #6
    Member
    Real Name
    Pevisha Joshi
    Join Date
    Jul 2014
    Location
    Vancouver, Canada
    Posts
    53

    Default Re: actionjavascript PDF file location

    Hi Gregg,

    That's interesting, I just tried downloading the files to a different computer and it works fine for me.
    Another thing you could try is, create a new project and add pdf.a5wcmp and reportPDF.a5rpt files present inside the Default.WebProject.
    Also, what version of alpha are you using? I am using 4770-5018 is that makes any difference.

    Pevisha
    img.png

  7. #7
    "Certified" Alphaholic iRadiate's Avatar
    Real Name
    Stephen
    Join Date
    Jan 2011
    Location
    London, ON
    Posts
    1,456

    Default Re: actionjavascript PDF file location

    Have you tried using File Download instead? You can define the name as a referenced filename on the component.

    FileDownload.png
    Alpha Anywhere v12.4.5.4.5 Build 5173-5138 IIS v8.5

  8. #8
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,040

    Default Re: actionjavascript PDF file location

    I appreciate everyone's help and apologize for the delay.
    This was meant to be an enhancement to a project I was working on and things just went nuts.

    Right now, the pdf opens in a new tab. My hope was to get it open in a div by the button that was clicked.

Similar Threads

  1. Actionjavascript possible in Map Marker Details?
    By cptutrecht in forum Mobile & Browser Applications
    Replies: 12
    Last Post: 05-05-2016, 02:15 PM
  2. Easy way to display PDF file in web browser per file location listed in grid
    By clankford in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 10-26-2015, 06:26 AM
  3. ActionJavaScript Delete
    By johnfletchertt in forum Mobile & Browser Applications
    Replies: 12
    Last Post: 05-22-2015, 10:28 AM
  4. Getting the folder location on file upload and file download javascript
    By acceptthis in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 03-09-2013, 06:00 PM
  5. Help File (.chm) Location
    By davej in forum Alpha Five Version 7
    Replies: 0
    Last Post: 08-23-2006, 10:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •