How to convert HTML page with graphic objects to PDF?

Article from our customer

Hi to All! Our company is engaged in geological exploration for new mineral deposits! In our daily work the one of important thing is getting of fresh topographic maps, which we are using for exploration!

Our company works closely with the Google Maps service! To all the cards were “at hand” at the employee, our Technical Department has decided to convert the maps from Google Maps to PDF format. This option allows us to have fresh cards even if no internet! To convert a variety of maps to PDF we are using the component PDF Vision.Net from the company SautinSoft.

Now our employees can always be guided by fresh cards varying degrees of zoom!

This is a code snippet to convert HTML page (with maps.google.com) to PDF format:

using System.IO;
using SautinSoft.PdfVision;

namespace Sample
{
    class Program
    {
        static void Main(string[] args)
        {
            ConvertUrlToPdfFile();
        }
        public static void ConvertUrlToPdfFile()
        {
            PdfVision v = new PdfVision();
            string inpHtml = @"https://developers.google.com/maps/documentation/javascript/examples/map-geolocation";
            string outPdf = Path.GetFullPath("Result.pdf");

            // Open the result for demonstration purposes.
            System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(outPdf) { UseShellExecute = true });
        }
    }
}

If you need a new code example or have a question: email us at support@sautinsoft.com or ask at Online Chat (right-bottom corner of this page) or use the Form below:



Questions and suggestions from you are always welcome!

We are developing .Net components since 2002. We know PDF, DOCX, RTF, HTML, XLSX and Images formats. If you need any assistance with creating, modifying or converting documents in various formats, we can help you. We will write any code example for you absolutely free.