Four Js Development Tools Forum

Discussions by product => GAS and GBC => Topic started by: Jeff W. on November 11, 2010, 12:10:57 am



Title: GWC view PDF file
Post by: Jeff W. on November 11, 2010, 12:10:57 am
When viewing a PDF using GWC front-end, the provided app "gviewpdf" displays a newly created PDF file using a Menu (example attached).  Is there another way to do this without the Menu?  I can't find a frontcall used by GWC to open a PDF directly, but the Menu solution is awkward.


Title: Re: GWC view PDF file
Post by: Terry H. on November 11, 2010, 03:37:30 pm
If you can copy the server-side pdf to a directory under the GAS DOCROOT, you can open it as a relative url using frontcall launchurl.

#-- pseudo-code
if (os.Path.copy(my_pdf, "%FGLASDIR%\\web\\my_dir\\"||my_pdf)) then
   let pdf_url = "/my_dir/my_pdf"
   call ui.Interface.frontCall("standard", "launchurl", [pdf_url], [])
end if

In as.xcf, see also:
<RESOURCE Id="res.path.docroot" Source="INTERNAL">$(res.path.as)/web</RESOURCE>
...
<DOCUMENT_ROOT>$(res.path.docroot)</DOCUMENT_ROOT>

Or, something like that!
HTH, Terry