Buy Now

novaPDF Professional
$62.44 $49.95

novaPDF Standard
$53.27 $39.95

novaPDF Lite
$24.94 $19.95

Awards & Reviews

  • 1_ico
  • 2_ico
  • 3_ico
  • 4_ico

Lockergnome feature

novaPDF is really neat

"novaPDF – Print To PDF Without Breaking The Bank. After downloading and installing the program (which takes all of one minute) you’re ready to print to a PDF. Any program that can print via the standard Windows printer interface can print to PDF (i.e. convert a file to PDF), including text, Word, Excel, […] , novaPDF will convert your files into PDF format without making your wallet cry."

Editor’s Review

This application is great

"[...] Pluses: novaPDF supports multiple profiles. This means that all your settings can be easily saved or loaded. Another great feature is the program’s ability to put bookmarks into the PDF document it creates. Drawbacks/flaws: [none] In conclusion: This application is great for generating PDF documents out of any type of printable data."

Indezine Review

Provides a good balance

"[...] novaPDF provides a good balance between price and performance -- it's a very usable option between free and highly priced PDF creators so that you can provide PDF output capabilities to a large number of users at a reasonable cost."

AC Review

Extremely easy to use

"[...]I highly recommend NovaPDF as a great and very simple way to create standard PDF documents that are fully compatible with Adobe Acrobat Reader. Nova PDF creator is an extremely easy to use and simple PDF creator"

Latest News

April 12, 2010

novaPDF 7.1 was released.

Changes in version 7.1:
  • Added visibility layers for watermarks
  • Added Document Creator option
  • Added Page Scaling options
  • Added option to remove PDF after emailing
  • Added Lithuanian language

You can download version 7 here: Download novaPDF 7.1

Stay Updated

To join, simply enter your email address below and click on Subscribe.

About Us

Softland, the company that develops novaPDF, achieved the Microsoft Certified Partner status with an ISV/Software Solutions Competency. Microsoft Certified Partner
Share
Add comment
Votes: 0
Comments: 0
Note: To be able to use the samples you must install novaPDF SDK as samples work only with it. Download it here: nova PDF SDK.

The Word OLE CSharp sample is a simple Windows console application that converts a MS Word document (C:\Test.doc) to PDF using Word OLE automation.

Source code

using System;
using System.Drawing;
using System.Drawing.Printing;
using System.Windows.Forms;
// the novapiLib package must be added as a        COM        reference
using novapiLib; 

namespace Hello_World_CSharp
{
///        <summary>
///        Summary        description        for        Class1.
///        </summary>
class Class1
{
   ///        <summary>
   ///        The        main entry point for the application.
   ///        </summary>
   public static string PRINTER_NAME = "novaPDF Pro v6";
   public static string NOVAPDF_INFO_SUBJECT =        "Document Subject";
   public static string PROFILE_NAME = "Test C# OLE";
   public static int    PROFILE_IS_PUBLIC = 0;
   public static uint         NV_PROFILE_EXISTS = 0xD5DA0006; 

   [STAThread]
   static void        Main(string[] args)
   {
     try        
     {
       // create the NovaPdfOptions object
       NovaPdfOptions pNova = new NovaPdfOptions();
       // initialize the NovaPdfOptions object
       // if you have an application license for novaPDF SDK,
       // pass both the registration name and the license key to the Initialize() function
       // pNova.Initialize(PRINTER_NAME, "<registration name>", "<license key>", "<application name>");
       pNova.Initialize(PRINTER_NAME, "", "", "");
       // get the active profile ...
       string activeProfile;
       int nActivePublic;
       pNova.GetActiveProfile(out activeProfile, out nActivePublic);
       try        
       {
         // and make        a copy of it
         pNova.CopyProfile(activeProfile, PROFILE_NAME, PROFILE_IS_PUBLIC);
       }
       catch (System.Runtime.InteropServices.COMException e)
       {
         // ignore profile exists error
         if (NV_PROFILE_EXISTS == e.ErrorCode)
         {
           System.Console.WriteLine("Profile Test C# OLE already exists");
         }
         else
         {
           // more        serious        error, propagate it
           throw e;
         }
       }
       // set the copy        profile        as active profile ...
       pNova.SetActiveProfile(PROFILE_NAME, PROFILE_IS_PUBLIC);
       // and set some        options
       pNova.SetOptionString(NOVAPDF_INFO_SUBJECT, "C# Hello document", PROFILE_NAME, PROFILE_IS_PUBLIC);
       // set nova default printer
       pNova.SetDefaultPrinter();
       // initialize OLE usage in novaPDF
       pNova.InitializeOLEUsage("Word.Application");
       // create Word application object
       Word._Application WordApp = new Word.Application();
       WordApp.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone;
       // license OLE server in novaPDF
       pNova.LicenseOLEServer();
       // initializations
       object objMissing = System.Reflection.Missing.Value;
       object objTrue = true; object objFalse = false;
       object strFile = @"C:\test.doc";
       // create Word document object
       Word._Document WordDoc = WordApp.Documents.Open(ref strFile, ref objFalse, ref objTrue,
           ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing,
           ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing,
         
ref objMissing);
      
// print document
       WordApp.ActivePrinter = PRINTER_NAME;
       WordDoc.PrintOutOld(ref objFalse, ref objFalse, ref objMissing, ref objMissing,
         ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing,
         ref objFalse, ref objMissing, ref objMissing, ref objMissing);
       // close Word objects
       WordDoc.Close(ref objFalse, ref objMissing, ref objFalse);
       WordApp.Quit(ref objFalse, ref objMissing, ref objFalse);
       WordApp = null;
       // restore active profile
       pNova.SetActiveProfile(activeProfile, nActivePublic);
       pNova.DeleteProfile(PROFILE_NAME, PROFILE_IS_PUBLIC);
       // restore default printer
       pNova.RestoreDefaultPrinter();
     }
     catch (System.Runtime.InteropServices.COMException e)
     {
       MessageBox.Show(e.Message);
     }
     catch (Exception e)
     {
       MessageBox.Show(e.Message);
     }
   }
}
}
Add comment
Name:
Email:
* Comment:
(Use BBcode - No HTML)


Others in this Category
document How to install (or uninstall) novaPDF silently
document MFC Scribble - SDK sample
document Can I order 2 single application licenses?
document Hello World VBNet - SDK sample
document [novaPDF SDK] - Are printer options related to each other? Do I need to set any option before I can set the Save Folder and Save folder options?
» More articles
RSS

Legal Notices Terms of Use

Copyright Softland 2010. All rights reserved.