I am getting PDF bytes which I am converting to Convert. How to pass parameter with base64string something like this as shown below: iframe.src = 'data:application/pdf;base64,' + pdfbytesData + '#search=' +. Nov 15, 2018 To open the PDF document in an IFrame, the PDFViewerApplication.open method in the viewer.js should be called from the Angular component. In the below line, the iframe is the DOM object and the response.data is the PDF byte array object.
-->
by Scott Mitchell
Download Sample App or Download PDF
In this tutorial we look at the options to present binary data on a Web page, including the display of an image file and the provision of a 'Download' link for a PDF file.
Introduction
In the preceding tutorial we explored the two techniques for associating binary data with an application s underlying data model and used the FileUpload control to upload files from a browser to the web server s file system. We ve yet to see how to associate the uploaded binary data with the data model. That is, after a file has been uploaded and saved to the file system, a path to the file must be stored in the appropriate database record. If the data is being stored directly in the database, then the uploaded binary data need not be saved to the file system, but must be injected into the database.
Before we look at associating the data with the data model, though, let s first look at how to provide the binary data to the end user. Presenting text data is simple enough, but how should binary data be presented? It depends, of course, on the type of binary data. For images, we likely want to display the image; for PDFs, Microsoft Word documents, ZIP files, and other types of binary data, providing a Download link is probably more appropriate.
In this tutorial we will look at how to present the binary data alongside its associated text data using data Web controls like the GridView and DetailsView. In the next tutorial we'll turn our attention to associating an uploaded file with the database.
Step 1: Providing
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |