Opening PDF

  
How to Open PDF file in the Browser on some page ex: i want to open one PDF in one Page (Suppose abc.aspx) and beside that PDF i want to keep some fields. How to achive this>


pls help
Hi Jaydeep,

To achieve this you can simply create a screen only with a Preparation where you should get your PDF (say, from the database) and instead of having an END you should put a Download with the "Save To Disk" property set to "No".



This should do the trick.
Hope it helps.

Kind Regards,
Gonçalo M.
Jaydeep,

From your description it sounds like what you want to do is have a PDF embedded in a page so that you can have infromation surrounding it. Is this what you're after?

Richard
Hi Jaydeep,

For embedding a PDF Document inside a WebScreen,
Create an expression and set Escape Content = No

use this inside the expression
"<embed height=""600"" src=""http://samplepdf.com/sample.pdf"" type=""application/pdf"" width=""500""></embed>"
replace the url  with the url to your pdf, modify the height and width to suit your needs

Regards,
Charles.
Yes 
Richard Pearson But let me try the thing explained by Gonçalo Martins but also i want some info from that pdf so that i can save.
I will try as you explained and than i will come to you again Charles Colaço  

Thanks for your valuable feedback
Your choice depends on your real requirements and needs.
In my way you have the Binary and in the other case you'll have a link and a HTML embed tag.
Gonçalo Martins I tried as you way it is working

Thanks
Charles Colaço i tried your way as well but it is not showing me the data But of course it is generating a space in that
jaydeep mankodi wrote:
Charles Colaço i tried your way as well but it is not showing me the data But of course it is generating a space in that
 For embedded documents there are two things that are necessary,
  • check if the url is working correctly (how are u getting the url? Is it a static pdf url or is it being genereated)
  • you must have a pdf viewer plugin installed on your pc (I use http://www.foxitsoftware.com/downloads/)
Also which browser are you using (chrome doesn't require a pdf viewer plugin)
 
jaydeep mankodi wrote:
Gonçalo Martins I tried as you way it is working

Thanks
Good to know ;)

 
Charles Colaço wrote:
jaydeep mankodi wrote:
Charles Colaço i tried your way as well but it is not showing me the data But of course it is generating a space in that
 For embedded documents there are two things that are necessary,
  • check if the url is working correctly (how are u getting the url? Is it a static pdf url or is it being genereated)
  • you must have a pdf viewer plugin installed on your pc (I use http://www.foxitsoftware.com/downloads/)
Also which browser are you using (chrome doesn't require a pdf viewer plugin)
 
 I have IE7 and i am using static path like <embed height="600" src="D:\abc\temp.pdf" type="application/pdf" width="500"></embed> 
If the file is present  at D:\abc\temp.pdf on the server (it has to be on the server and not on the Client computer)
then your src should be like this
src="file:///D:/abc/temp.pdf"

if this doesn't work then try
src="file:///D:\abc\temp.pdf"


Charles Colaço i added the temp.pdf file to resources folder under DATA/Resources/temp.pdf (now can you please tell me what path it would be ?) i mean http://localhost/PDFDownload/ (would it be   Resources/temp.pdf)
Make sure that the attributes for temp.pdf under Data -> Resources  are as shown below



then you can use this in the expression

"<embed height='500' src='Documents\temp.pdf' type='application/pdf' width='600'></embed>"
Charles Colaço Thanks a lot i have solved mine problem, i did as you explained and it works very good.

and thanks to Gonçalo Martins also
Charles Colaço  i got the success in opening the file from source But now i am trying to open file from the Database is it possible to do so?
(i stored the temp.pdf as binary in Table now how to open that file) in browser
Hi JD,

You can do this by mixing the method I firstly told you and the iframe.
You need to build a screen only with the Preparation, where you'll have not an END but a Download with the "Save To Disk" property set to "No":
     -->  


          --->     
 


Then, in the source attribute of the iframe tag (in the screen where you want to display the file) you should use the GetEntryURL method to get that page URL and that's it:



This works and it's simple to implement.
Hope it helps.

Regards,
Gonçalo Martins

Hi,

The embed equivalent would be,
to create webscreen (e.g. getfile) with a preparation action ending with a download (as Gonçalo mentioned)

then u would use this in the expression
"<embed height='500' src='getfile.aspx' type='application/pdf' width='600'></embed>"
Gonçalo Martins wrote:
Hi JD,

You can do this by mixing the method I firstly told you and the iframe.
You need to build a screen only with the Preparation, where you'll have not an END but a Download with the "Save To Disk" property set to "No":
     -->  


          --->     
 


Then, in the source attribute of the iframe tag (in the screen where you want to display the file) you should use the GetEntryURL method to get that page URL and that's it:



This works and it's simple to implement.
Hope it helps.

Regards,
Gonçalo Martins
 
what i want is, taking PDF on Screen but it's not coming and what i have done is given below

 
JD wrote:
Gonçalo Martins wrote:
Hi JD,

You can do this by mixing the method I firstly told you and the iframe.
You need to build a screen only with the Preparation, where you'll have not an END but a Download with the "Save To Disk" property set to "No":
     -->  


          --->     
 


Then, in the source attribute of the iframe tag (in the screen where you want to display the file) you should use the GetEntryURL method to get that page URL and that's it:



This works and it's simple to implement.
Hope it helps.

Regards,
Gonçalo Martins
 
what i want is, taking PDF on Screen but it's not coming and what i have done is given below

 
You might be doing something wrong because I can assure you that this works.
I even get this prints from a working example.
Send me your eSpace if you want, to let me take a look.

 
I Resolve the problem with what you have mentioned first and tried out with embed tag as well it is working nicely in both the way, thaks Gonçalo Martins and Charles Colaço
JD wrote:
I Resolve the problem with what you have mentioned first and tried out with embed tag as well it is working nicely in both the way, thaks Gonçalo Martins and Charles Colaço
Nice to know that you did it :)

Kind Regards,
Gonçalo M.
 
and what about opening in a new browser tab??
Hello Filipe,

You can do exactly the same, but setting a link to the destination page, using the target attribute.
In pure HTML you may see it as:

<a href="<your destination>" target="_blank">Your Link</a>

Any doubt, just say it.

Regards,
Gonçalo Martins



Filipe Lourenço wrote:
and what about opening in a new browser tab??
 
 
Hi To All,

I'm new in Outsystems. Where can I add the iFrame?I'm designing a similar app as well which displays the pdf selected by the User.

Thank you.

Best regards,

Christopher
Hi Christopher
Welcome to outsystems.....

Well you can define the size of the Iframe from the expression Value  which is to your bottom right of the screen....

Hi Kayala,

Thanks for the prompt reply. I've tried the samples above but one thing that I haven't been successful with, loading to another web page the pdf to be viewed. I've able to upload and download the file but failed to the latter. My apologies for the newbie questions but I'm having a bit problem in understanding the script (ember or iframe).

Many Thanks.

Best regards,

Christopher
Hi Christopher,

I could not understand what you want to do. Do you want to open a pdf downloaded in a new browser tab? Which of the above steps exactly are you having problems?