Ionic 3 view PDF in content view with external URL - pdf

The application has to show invoice PDF inside <div> which is currently rendered in Webapp itself.
For example :
The web app already has the PDF generation functionality which generates by clicking on generate_pdf function.
I want to show the same PDF by using the same function which is currently available for the public.
Example URL:
http://URL/index.php/pulic/view/generate_invoice_pdf/Smgr4NX7yiWfu3J6qhdtRzF9lVT0kLs2
I have tried InAppBrowser however, it opens up outside the app just want to show inside the app.
DocumentViewer is not supported since it does not contain .pdf in URL

Anyone who needs the solution
I use fileTranfer to download the file and File to show it on the device.

Related

Is there any way to save a webpage as a pdf document in flutter web view

I am currently using flutter InAppWebView Plugin. I want to save a web page as a pdf file when the url of the page is given. I have used the printCurrentPage() method of the InAppWebView plugin but it does not return the filepath back to the app after saving the file so that it can be shown in a list view in the app itself. Can anyone help me save the webpage as a pdf and show the saved files as a list view.
I have tried webcontent_converter plugin too but it looses some content of the page like images and icon to include in the pdf file.

Web APIs FileReader() hide download option

I've successfully integrated the FileReader() that renders a file from a BLOB so the user can view and interact with it, however the revised criteria states that the user shouldn't be allowed to download the document now.
The requirement is that the download icon is removed from the FileReader() but I can't seem to find a way of doing this, as it's baked into the actual Web API.
I started to write my own PDF viewer using a basic Vue to PDF package and adding custom controls but this is a bit of a monster and I'd like to avoid a complete re-write to remove one action.
Is there any way of removing the download CTA before it renders the PDF?
More context..
The PDF is rendered in the DOM from a BLOB that's passed via an end point I hook into with Axios. I then readAsDataURL(blob) and finally create the FileReader() result as a URL.createObjectURL(blob) to give me the data that I render as the canvas src to enable the PDF viewer. Unfortunately this can't be a PNG as it needs multi pages. Thee issue is that it's sensitive docs that can only be viewed on the portal, so it's to prevent users from easily downloading (aware they could just print screen).

Creating custom product page on BigCommerce

I'm trying to create a modified product page in my BigCommerce Cornerstone theme and I'm following the video on the following link:
https://stencil.bigcommerce.com/docs/custom-layout-templates
The video claims that I need to use a live URL when I create a new HTML under /template/pages/custom/product and map it in the .stencil file.
The way I created a new live URL is that I created a completely empty web page. The first difference I notice though, compared to the video is that when I navigate to the page it's not completely empty as shown in the video but shows the header and footer of the website.
When the video asks to copy the contents of the original product.html into my newly created HTML under /template/pages/custom/product, the HTML markup doesn't get picked up i.e. the page will not show components of a product page.
I got stuck at this point and cannot continue with modifying the template.
If you are creating a custom product template, you would need to map it to the live URL for a product in your store. Mapping a custom product template to a web content page won't work.
It's important to note the difference between page types. If you are creating a custom category template, you would map it to an existing category page in your store, etc.
After you map the product page URL in your .stencil file, be sure to restart Stencil CLI. You'll need to restart to see the changes reflected on localhost in your browser (i.e. a blank page at the product page url if you mapped an empty html file to it).

Uploading a file with CKEditor's upload functionality but out of the context of the editor itself

I'm currently using the CKEditor and have it working with image upload and browse functionality. In another area of my application, I want to let the user upload an image to the server, but there is no need for a text area at this point. Is it possible to create a simple link or button that launches the upload functionality from CKEditor without actually plopping the textarea/html editor in the space I want my button?
i.e this would be perfect (with javascript too, of course)
<i class="icon-picture"></i> Upload

display html in xaml

I wasted few hours for looking the answer and I'm very sad cause I didn't find anything usefull. I have a CMS in cloud and it provides content for diffrent devices like www site and my new windows store application.
I want to use html formating. I've already created app in c# and xaml and I'm wondering how can I display html
I was happy cause I found http://nuget.org/packages/RichTextBlock.Html2Xaml but I can't make it work. I get blank page. No text, no error, no nothing.
Can someone pls tell me how can I display html in my app ?
Use a WebView/WebViewBrush or use HTML Agility Pack and implement the styles/rendering yourself.
In WinRt app you can display html code by some ways:
Using WebView with it's NavigateToString("html content")
Using WebViewBrush and displaying it in rectangle
If you had your .html file local - you can open it with myWebview.Navigate(new Uri("ms-appx-web:///" + myPath));
You can make a screenshot of webpage by the method wich I describe here and open it as a picture.
For more info, see the WebView control sample