Converting Web Page with Google map into PDF - google-maps

I am using iTextSharp library for converting my .aspx page into PDF. I am using Table, labels and Google map in my page. Every thing converts into PDF except Google map. In PDF file it shows Google map code instead of showing Map. I could not understand, how to fix this problem ?
Any help to fix this

So you're using iTextSharp to parse HTML, right? Unfortunately iText and iTextSharp's HTML parsers are still in their infancy and Google's maps use both iframes and JavaScript, neither of which are supported in the parser. You can see a list of supported HTML tags here. I would not be surprised if adding a JavaScript interpreter is not even on the to-do list.

Related

embed a pdf archive like it were part of the html code

i had a little question, i want to embed a pdf like it were part of the website, i could rewrite the pdf in html but it will be a lot of work, what would be the best looking option to embed it?
The pdf has pictures and letters with fonts and columns.
Thanks.
I would go with one of the two approaches. One is a native rendering of the PDF content in a DOM node, using PDF.js. It is an open source library that's used as the default PDF viewer in Firefox.
Another way is to emulate the look by converting the PDF pages to images when the PDF is uploaded. You may use imagemagick to parse the pages, and display the content in a slideshow/gallery widget.

Highcharts/Highstock supported in Google Sites?

Is it possible to embed Highcharts scripts in Google sites?
I've tried inserting an HTML box and also throwing everything in an HTML file and calling it via a Google Apps script. So far, both methods just give me all the text from the graph (title, axis labels, etc.), but no graph. I know embedding JS in a Google site is kind of tricky, but can this be done?
No. SVG (which Highcharts uses) is not supported within Caja (which an HTML Box and Apps Script use to sanitize and ensure safe code).
Yes, as of Jan 2016 (at least), I can easily use a highcharts library in GAS.
A dynamically updating graph using highcharts library within GAS environment can be found here: GAS-highcharts
A Working example is here: working-highcharts-GAS
It is based on this JSFiddle: jsfiddle (dot) net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/stock/demo/dynamic-update/

What library does Google Chrome use to remove unnecessary stuff while converting an HTML page to PDF or just print it?

WHen we try to print a document in Google Chrome, it shows It's preview without any advertisements and any dynamic content like comments that might have been there.
What does it use to get rid of the extra unnecessary stuff from the DOM and convert it to a PDf when we save it as PDF ?
Is it a C++ library ?
The library is pdfium, https://pdfium.googlesource.com/pdfium/+/master
This news article explains the library pretty well:
http://www.infoq.com/news/2014/06/google-chrome-pdf-engine-free

Convert PDF to HTML in ios?

To Do : Convert pdf file to HTML file
For Eg: The pdf file in link below
http://www.inkwelleditorial.com/pdfSample.pdf
should be converted to HTML file.
Study : I googled and found out few ways to convert HTML to PDF like
Convert html file to PDF Document in iOS using Cocoa-Touch
Creating a PDF with iOS
Generating PDF Content
but could not get any way to do vice versa ie convert pdf to HTML.
Is there any library available in objective C for above purpose?
sorry, I dont think there is a reliable way to keep the formatting (and neither for get all text.)
you'd be better off to display and search the pdf using pspdfkit

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.