Not able to see pdf content using href - angularjs

download pdf usinmg this ma able to open pdf in new window but not able to see the content of file...could you please help me to get the content on file...
using Angular 1.4

Related

Grab and save SVG File using selenium - C# Selenium chromedriver WinForm

I am writing WhatsApp tool in C# winform using Selenium ChromeDriver.
I have handled all operations like sending the message, clicking the attachment and all from WhatsApp web using Selenium ChromeDriver.
I want to read the WhatsApp web's QR Code which is in SVG format. I want to read the SVG File and convert and save as image in local.
I could save the QR Code using snapshot, but I don't prefer using this because I have to maintain vertical scroll position to bring full QR Code on screen.
So please help me save svg file image using chromedriver
Thank you.
-Ishrar
I'm not sure of the specific commands in Selenium, but can't you just:
copy the SVG code via Javascript/a Selenium method
then create a new .svg file in Java and save this copied svg code as the contents?

How to open a generated file on Vaadin Flow?

On my app I want to open a generated PDF with PdfBox on a new tab, I have seen a couple of documentations but they are for old version of Vaadin or won't work in my case. I don't want to save it on the server or attach the file to any link or button, I want to write a method to automatically open it on a new tab.
PdfBox gives an option to save the file on an OutputStream, is there any way to open that OutputStream file on a new tab? Or at least download it without attaching it to an Anchor widget like Flow Viritin does?
The problem lies in the fact that because you don't want to save the file on the server, you cannot then have a direct url of said file to link to. You also cannot pass the pdf file as parameter to another View.
The solution is to store the pdf in the VaadinSession (as byte[] is probably easiest), and when the user then opens another tab by clicking a certain anchor/routerlink, that view will read the pdf from the VaadinSession and add the it to the view. (How to display pdf with Vaadin 14). Please remember to remove the pdf again from the VaadinSession :)

Is it possible to convert .pdf file to image in ionic with AngularJS?

I am very new to ionic. So I want to convert my pdf file to an image file in using Angularjs.
Once you have rendered the PDF in your appliaction using PDF.JS, converting a PDF page to an image is nothing special. PDF.JS uses a element to render a PDF (although it can also be set to use an SVG). You can easily convert the underlying canvas to an image using canvas.toDataURL method.
We can use canvaz to pdf convertion for this purpose
For more information :
http://usefulangle.com/post/24/pdf-to-jpeg-png-with-pdfjs

Creating the view as PDF in sencha touch

My requirement is after user taps createPDF button,to generate current view as PDF. Using
console.log(this.getMain().getActiveItem().renderElement.dom.innerHTML);
i can able to get entire HTML element. Now i stuck to generate my view as PDF. Any suggestion
You should google pdf viewer.
For example, if you wanted to view the PDF at the URL http://research.google.com/archive/bigtable-osdi06.pdf ,
you would use the URL: http://docs.google.com/viewer?url=http%3A%2F%2Fresearch.google.com%2Farchive%2Fbigtable-osdi06.pdf
then use HTML object tag and pass the url to "data" attribute. Attached this as html in your view.
Thanks
You have two options if you are working in a browser, (if you are working in mobile devices you should working with inAppBrowser cordova plugin)
1º With the mozilla-pdf library: http://mozilla.github.io/pdf.js/
2º With the pdfObject library: http://pdfobject.com/instructions.php
Both libraries are very complete to work with the browser but the mobile devices are other mistake...

JSF primefaces editor loading file

I'm using jsf primefaces editor, i want to load a text file a value to it.
http://www.primefaces.org/showcase/ui/editor.jsf
Please may i know if this is possible?

Resources