The upcoming release will be a big one so keep an eye on the other posts in this series. You may also want to consider subscribing to our RSS feed or following us on Twitter. If you are interested in participating in the beta program then please drop us a line.

 We anticipate that most of our customers will use this functionality to convert SharePoint pages, including lists, to PDF format. However, rather than displaying a boring old SharePoint site, let’s show how well this works with a real website, in this case one of our landing pages.
The following image shows the original HTML page on the left hand side and the converted PDF file on the right. As you can see this works very well. 
 
HTML-to-PDFExample of the original web page (left) and the converted PDF file (right)
  
A summary of the new HTML features are as follows. Although this new functionality is available in both the PDF Converter Services as well as the PDF Converter for SharePoint, some of the more SharePoint centric features in the list are obviously exclusive to the SharePoint version.
  1. Built on top of Muhimbi’s rock solid service platform. No need to worry about runaway or orphaned processes. Everything is nicely controlled and scales over multiple CPUs and conversion servers. 
     
  2. Integrates with the full feature set of Muhimbi’s PDF Conversion platform including full control over watermarks as well asPDF Security settings
     
  3. High fidelity conversion (See image above) including multi page documents and JavaScript output. The generated PDF file contains real (searchable) text and is not just a low resolution screenshot of the converted web page. 
     
  4. Supports conversion by URL as well as manually specified HTML fragments. Ideal for creating PDF based reports using generated HTML tables. 
     
  5. Convert HTML documents stored inside SharePoint document libraries. 
     
  6. Convert SharePoint pages to PDF format from the user’s Personal Actions menu. 
     
  7. Convert web pages to PDF format from SharePoint workflows. Works great in combination with publishing sites.

HTML to PDF Conversion is accessible via the web services based interface as well. Listed below is a simple C# example of how to carry out a conversion from your own code. The code is not complete as it calls into some shared functions from our main C# example to keep things short.
Our existing Java based examples can easily be extended to carry out the same type of conversions. Contact us if you need a hand, we love to help and are very responsive. 
 
/// 
/// Simple sample to convert either a URL or HTML code fragment to PDF format
/// 
/// A flag indicating if an HTML Code fragment (true)
/// or URL (false) should be converted.
private void ConvertHTML(bool htmlOnly)
{
    DocumentConverterServiceClient client = null;
 
    try
    {
        string sourceFileName = null;
        byte[] sourceFile = null;
 
        client = OpenService("http://localhost:41734/Muhimbi.DocumentConverter.WebService/");
 
        OpenOptions openOptions = new OpenOptions();
 
        //** Specify optional authentication settings for the web page
        openOptions.UserName = "";
        openOptions.Password = "";
 
        if (htmlOnly == true)
        {
            //** Specify the HTML to convert
            sourceFile = System.Text.Encoding.UTF8.GetBytes("Hello world");
        }
        else
        {
            // ** Specify the URL to convert
            openOptions.OriginalFileName = "http://www.muhimbi.com/";
        }
        openOptions.FileExtension = "html";
        //** Generate a temp file name that is later used to write the PDF to
        sourceFileName = Path.GetTempFileName();
        File.Delete(sourceFileName);
 
        // ** Enable JavaScript on the page to convert. 
        openOptions.AllowMacros = MacroSecurityOption.All;
 
        // ** Set the various conversion settings
        ConversionSettings conversionSettings = new ConversionSettings();
        conversionSettings.Fidelity = ConversionFidelities.Full;
        conversionSettings.PDFProfile = PDFProfile.PDF_1_5;
        conversionSettings.PageOrientation = PageOrientation.Portrait;
        conversionSettings.Quality = ConversionQuality.OptimizeForPrint;
 
        // ** Carry out the actual conversion
        byte[] convertedFile = client.Convert(sourceFile, openOptions, conversionSettings);
 
        // ** Write the PDF file to the local file system.
        string destinationFileName = Path.GetDirectoryName(sourceFileName) + @"\" + 
                                            Path.GetFileNameWithoutExtension(sourceFileName) + 
                                            "." + conversionSettings.Format;
        using (FileStream fs = File.Create(destinationFileName))
        {
            fs.Write(convertedFile, 0, convertedFile.Length);
            fs.Close();
        }
 
        // ** Display the converted file in a PDF viewer.
        NavigateBrowser(destinationFileName);
    }
    finally
    {
        CloseService(client);
    }
}
All in all some pretty exciting functionality. Don’t hesitate to leave a comment below if you have any questions or contact us to participate in the beta program.