How to create PDF ajax view call?

Asked By 10 points N/A Posted on -
qa-featured

To all Techyv members, I hope all is well. Please help me how to  create PDF Ajax view call generator code. What are the steps and process for this kind of scripting? Your examples would really help. Also, include an overview for this kind of script as well as the issues encountered in creating it. I'll be waiting for your answers. 

SHARE
Best Answer by Leonard Drakeford
Answered By 0 points N/A #141286

How to create PDF ajax view call?

qa-featured

Hello Rubyjmorales,

The task you want to accomplish can be done in two ways.

1.   The PDF can be opened in a new pop-up window.

2.   The PDF file can be fetched and viewed on the same web page as if it is a part of the page.

In the attached notepad file you will find two code snippets, the first one will fetch and open the PDF file separately in a pop-up window while the second one will fetch the PDF from url and display it on the current web page. 

Best Answer
Best Answer
Answered By 0 points N/A #141287

How to create PDF ajax view call?

qa-featured

HELLO,

To load a PDF using Ajax do the following

  • Use your  PDF JavaScript libraries to render PDF directly from JavaScript without plugins.Then  try to see if those libraries let you set the PDF directly from binary data.

  • You can also try the option of  receive the PDF data as base64 encoded and use a Data URI to set window.location.href to that data URI, although in that case it's possible the PDF is offered as a download dialog instead of loading directly in the page, then test that.   window.location.href or <iframe> or window.open )

 

Login/Register to Answer

Related Questions