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

September 7, 2010

novaPDF 7.2 was released.

Changes in version 7.2:
  • New: Extended Email functionality
  • New: Added macros for folder name in Save settings
  • New: Added Profile name macro for file and folder names
  • Fix: Fixed images from Excel 2010

You can download version 7 here: Download novaPDF 7.2

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: 1
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 MFC Scribble sample extends the standard MFC Scribble sample with the generation of PDF files using novaPDF. It demonstrates how to integrate novaPDF SDK in a document/view MFC architecture:


Source Code Snippets

1. Register novaPDF Printer event
#define PROFILE_NAME      L"MFCScribble Profile"
#define PDF_FILE_NAME     L"MFCScribble.pdf"
#define PROFILE_IS_PUBLIC 0 

// This message is sent when the PDF file is finished and saved on the harddisk
const UINT  wm_Nova_FileSaved = RegisterWindowMessageW( MSG_NOVAPDF2_FILESAVED );
BEGIN_MESSAGE_MAP(CScribbleView, CScrollView)
//{{AFX_MSG_MAP(CScribbleView)
//...
//}}AFX_MSG_MAP
//...
ON_REGISTERED_MESSAGE(wm_Nova_FileSaved, OnNovaPDFFileSaved)
END_MESSAGE_MAP()

 

2. Initialize INovaPDFOptions
CScribbleView::CScribbleView()
{
//...
HRESULT hr = CoInitialize(NULL);
//...
//create novaPDFOptions object
hr = CoCreateInstance(__uuidof(NovaPdfOptions), NULL, CLSCTX_INPROC_SERVER, __uuidof(INovaPdfOptions), (LPVOID*) &m_pNova);
//...
//initialize novaPDFOptions object with desired printer name
// if you have an application license for novaPDF SDK,
// pass both the registration name and the license key to the Initialize() function
// m_pNova->Initialize(L"novaPDF Pro v6", L"<registration name>", L"<license key>");
m_pNova->Initialize(L"novaPDF Pro v6", L"", L"", L"");
}

3. Release INovaPDFOptions 

CScribbleView::~CScribbleView()
{
//release novaPDFOptions object
if (m_pNova){
  m_pNova->Release();
}
CoUninitialize();
} 

4. Set novaPDF Printer Options
BOOL CScribbleView::OnPreparePrinting(CPrintInfo* pInfo)
{
//set novaPDF default printer
if (m_pNova){
  m_pNova->SetDefaultPrinter(); 

  // create a temporary profile for the current print job,
  // in order to not modify the default profile settings
  m_pNova->AddProfile(PROFILE_NAME, PROFILE_IS_PUBLIC);
  // set PDF document Title
  m_pNova->SetOptionString(NOVAPDF_INFO_TITLE, L"MFC Scribble Sample", PROFILE_NAME, PROFILE_IS_PUBLIC);
  // set resulting file name
  m_pNova->SetOptionString(NOVAPDF_SAVE_FOLDER, L"", PROFILE_NAME, PROFILE_IS_PUBLIC);
  m_pNova->SetOptionString(NOVAPDF_SAVE_FILE, PDF_FILE_NAME, PROFILE_NAME, PROFILE_IS_PUBLIC);
  //do not show prompt dialog
  m_pNova->SetOptionLong(NOVAPDF_SAVE_PROMPT, 0, PROFILE_NAME, PROFILE_IS_PUBLIC);
  //if file exists, override
  m_pNova->SetOptionLong(NOVAPDF_SAVE_CONFLICT_STRATEGY, FILE_CONFLICT_STRATEGY_OVERWRITE, PROFILE_NAME, PROFILE_IS_PUBLIC); 

  // set active profile
  m_pNova->GetActiveProfile(&m_wsDefaultProfile, &m_nActiveProfilePublic);
  m_pNova->SetActiveProfile(PROFILE_NAME, PROFILE_IS_PUBLIC); 

  //register window to receive messages from novaPDF printer
  m_pNova->RegisterEventWindow((LONG)m_hWnd);
}
//...
}

5. Restore options when printing finished
void CScribbleView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
if (m_pNova) {
  //unregister events
  m_pNova->UnRegisterEventWindow();
  //restore default profile
  m_pNova->SetActiveProfile(m_wsDefaultProfile, &m_nActiveProfilePublic);
  m_pNova->DeleteProfile(PROFILE_NAME, PROFILE_IS_PUBLIC);
  CoTaskMemFree(m_wsDefaultProfile);
  //restore default printer
  m_pNova->RestoreDefaultPrinter();
}
} 

6. novaPDF Printer message handler
LRESULT CScribbleView::OnNovaPDFFileSaved(WPARAM, LPARAM)
{
//PDF is saved, so just show a message that the conversion to PDF was successful
MessageBox(L"PDF file was saved successfully", L"novaPrint");
return 0;
}
Add comment
Name:
Email:
* Comment:
(Use BBcode - No HTML)


Others in this Category
document [novaPDF SDK] - Do I have to open or activate a profile before trying to set an option for the printer driver?
document Hello World VBNet - SDK sample
document Can I order 2 single application licenses?
document PDF Reports - SDK sample
document Distributing novaPDF with 32bit applications that run on Windows x64
» More articles
RSS

Legal Notices Terms of Use

Copyright Softland 2010. All rights reserved.