how to export html form with canvas to pdf - html

I am trying to export an html page that contains html form and canvas to a pdf file (after onclick event (button)). I already been aware of wkhtmltopdf and PhantomJS but I think that it cannot be implemented as it should.
(the main problem is that I want to export the output offline, by covnerting the web app to android apk using the http://www.appsgeyser.com/)

To get your requirement, I hope you require to take pdf of web page.
if my understanding is correct, Please refer below link
http://www.hiqpdf.com/demo/ConvertHtmlToPdf.aspx
also see the existing post ITextSharp HTML to PDF?
Follow the Link of Zend_Pdf : http://framework.zend.com/manual/1.12/en/zend.pdf.html
You can also try jspdf : http://jspdf.com/
Or try to use javascript

Related

Is there anyway to convert full Html page to excel file

I would like to ask about converting html page to excel. I have searched on the google and stackoverflow but I could not find any library or fully worked code. I am meaning while saying "html page", not only html table but also "div" tags and other html tags (with visualization on the page). For this how can I do or is there any library to do this. I am using java on background and vue js for frontend.
Thank you in advance..

how to save and view my pdf online

Does anyone know any site that i can save my pdf file and view it?
I want to do is get the URL of the view page of my pdf so i can embed it in my Joomla.
The reason I'm doing this cause i got a specific pdf file that wont show in my Joomla article even though i used a pdf plugin already. The only solution i have is get the saved pdf file URL on that site and use it t embed it in my Joomla article.
so instead of saving the pdf to my joomla
{pdf=http://www.example.org/images/ADS/ads.pdf|820|820}
I'l' use the URL of that website to view my pdf in my Joomla article.
It's better if you can use joomla extention something like this to manage and view PDF
Or else use something like mediafire mediafire to upload your pdf file.
I have used this in the past:
http://extensions.joomla.org/extensions/directory-a-documentation/downloads/3115
It works perfectly.
In the article edditing, it adds an attach button.
It worked like a charm.
Do not forget to set the file as public when you upload it.
Furthermore, enable the installed plugin.

JSP/HTML/CSS to PDF generation

Basically a simple question:
In php you have mpdf/tcpdf etc libraries that convert your HTML/CSS as is into a pdf file.
I have now a JSP page from where i open up a popup JSP including kind of a organizational chart with divs created from HTML/CSS. Is it possible that i can just take this whole popup and convert it somehow into a pdf file -> in chrome you have the option of save as pdf -- and that works it creates a pdf file successfully ! But i want the website to create a pdf itself without browser plugin. Is it possible? Does Java/JSP have such an option to convert pure HTML/CSS to pdf?
You could use Wkhtmltopdf to convert from HTML to PDF. https://code.google.com/p/wkhtmltopdf/

Convert html 5 to PDF in MVC 3

I have created an application in asp.net MVC 3, I used highchart.js for rendering chart(stacked column) in view and its output is coming as svg.
I need to convert this chart page into PDF file. I tried iTextSharp but its not showing the chart page content.
Is there anyway to convert html 5 to PDF?
ExpertPDF is a nuget package you can install. For it to work without putting text over your pdf, you'll have to purchase a license. It can handle svg.
http://www.html-to-pdf.net/ExpertPDF-HtmlToPdf-Converter.aspx
You can also use a webkit component such as HTM2PDF to render HTML to PDF - see an explanation here:
Highcharts to PDF with Webkit
If you just want to convert svg to image then you can use PhantomJS (headless webkit browser). With help of PhantomJS you can render svg and make screenshot. Then you can create a PDF and insert that image into it.
Also you can Aspose.Pdf for converting svg into PDF directly. See: http://www.aspose.com/.net/pdf-component.aspx (it's a paid component!)

Can you embed an HTML webpage in a PDF file?

A flash file can be embedded in a PDF document. Does anyone know if it is also possible to embed an HTML webpage?
Added:
I don't mean just a plain HTML document, but a webpage with Javascript too.
The answer is no.
While you can embed videos, sounds and SWF files in a PDF, dynamic HTML files aren't supported. (Adobe AIR is more suitable to package and distribute HTML files).
The best you can do in a PDF is to use the ATTACH option in Adobe Acrobat. This will "attach" any file with the PDF document similar to how you add an attachment with an email. But the attachment can't be viewed within the PDF document, and has to be opened separately.
More info:
Javascript can be added to PDF files and used to manipulate various elements within the PDF file.
Not directly. Depending on what you're looking for, however, you can use something like dompdf (PHP) to generate a PDF file from an HTML document, then merge that document with your original. It even supports JavaScript, up to the level Adobe Reader supports JavaScript.
That said, the PDF file format is really for things you want to print (i.e. want to look the same everywhere), not things you want to click on (i.e. look sensible everywhere). Adobe's decision to include Flash support was probably made from a marketing standpoint, not a technical one.
The best workaround would be to create a web/html viewer in Adobe Flash and embed that in a PDF as an SWF. There is an option to "Add SWF" in Acrobat under "Rich Media."
Created a NPM module that allows you to add custom HTML and CSS to PDF's.
const pdf = require('add-html-to-pdf');
var options = {
input: 'sample.pdf',
output: 'done.pdf',
html: "<div style='color:red'>This is awesome!</div>",
useDocker: true
}
pdf.insertHTMLInPDF(options);
You could reconstruct the html, css and js on the web page using php.
Im using a plugin with a wordpress site that is pretty outdated but works very well for creating pdfs with html, css and javascript.
it's called tcpdf
plugins/tcpdf/tcpdf.php
https://tcpdf.org/examples/
the pdf is made on the fly as a function.