Search:     Advanced search
Browse by category:
Glossary | Contact Us



[novaPDF SDK] How to generate a pdf file without the Save As dialog

Add comment
Votes: 0
Comments: 0

To disable novaPDF "Save As" dialog, you have to set the folder and the file name programmatically. Here's an example on how you can set the folder and file name of the PDF to be saved in different programming languages (next code, has to be called after the Initialize() function):

In Visual Basic (full SDK sample is here - VB Converter):
' disable the "Save PDF file as" prompt
m_NovaOptions.SetOptionLong2 NOVAPDF_SAVE_PROMPT, False, SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC
' set generated Pdf files destination folder  "c:\"
m_NovaOptions.SetOptionString2 NOVAPDF_SAVE_FOLDER, "c:\", SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC
' set output file name
m_NovaOptions.SetOptionString2 NOVAPDF_SAVE_FILE, "PDF Converter small size.pdf", SMALL_SIZE_PROFILE,
PROFILE_IS_PUBLIC

In VB.NET (full SDK sample is here - VBnet Converter):
'disable the "Save PDF file as" prompt m_NovaOptions.SetOptionLong2 NOVAPDF_SAVE_PROMPT, False, SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC
'set generated PDF file destination folder "c:\"
m_NovaOptions.SetOptionString2 NOVAPDF_SAVE_FOLDER, "c:\", SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC
' set output file name
m_NovaOptions.SetOptionString2 NOVAPDF_SAVE_FILE, "PDF Converter small size.pdf", SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC

In C++ (full SDK sample is here - MFC Converter):
// disable the "Save PDF file as" prompt
hr = m_novaOptions->SetOptionLong(NOVAPDF_SAVE_PROMPT, FALSE, SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC);
// set generated Pdf files destination folder ("c:\")
hr = m_novaOptions->SetOptionString(NOVAPDF_SAVE_FOLDER, L "" , SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC);
// set output file name hr = m_novaOptions->SetOptionString(NOVAPDF_SAVE_FILE, L "PDF Converter small size.pdf" , SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC);

In C# (full SDK sample is here - CSharp Converter):
// disable the "Save PDF file as" prompt
mobjNovaOptios.SetOptionLong2(NovaOptions.NOVAPDF_SAVE_PROMPT, 0 , SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC);
// set generated PDF file destination folder "c:\"
mobjNovaOptios.SetOptionString2(NovaOptions.NOVAPDF_SAVE_FOLDER, "c:\\" , SMALL_SIZE_PROFILE, PROFILE_IS_PUBLIC);

In Delphi (full SDK sample is here - VCL Converter):
// disable the "Save PDF file as" prompt
hr := m_novaOptions.SetOptionLong2(NOVAPDF_SAVE_PROMPT,
                                   0 ,
                                   SMALL_SIZE_PROFILE,
                                   PROFILE_IS_PUBLIC);
// set generated Pdf files destination folder to the application path
hr := m_novaOptions.SetOptionString2(
                      NOVAPDF_SAVE_FOLDER,
                      ExtractFilePath(Application.ExeName),
                      SMALL_SIZE_PROFILE,
                      PROFILE_IS_PUBLIC);
// set output file name
hr := m_novaOptions.SetOptionString2(NOVAPDF_SAVE_FILE,
                                     'PDF Converter small size.pdf',
                                     SMALL_SIZE_PROFILE,
                                     PROFILE_IS_PUBLIC);

Others in this Category
document [novaPDF SDK] SetDefaultPrinter doesn't work after RestoreDefaultPrinter is called
document How to install (or uninstall) novaPDF silently
document [novaPDF SDK] - Do I have to open or activate a profile before trying to set an option for the printer driver?
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?
document [novaPDF SDK] - Is there an option not to open the uninstall feedback page when novaPDF is uninstalled?
» More articles



RSS

© 2002-2008 Softland. All Rights Reserved.
PDF Creator novaPDF
Create PDF for a paperless office
home Home   contact usContact us   partnershipsPartnerships   bookmarkBookmark   Site updated: 12-Mar-2008
DownloadsDownload

Download, install and use novaPDF. Latest version: 5.4 build 255

Download PDF creator
promotionsSpecial Offers

Current discounts:
- up to 25% for Desktop Editions
- up to 25% for Server Editions
- 20% Academic Discount
- up to 16% for Developer Tools

buyBuy Now
Professional edition $39.95
(Save $10)
Standard edition $29.95
(Save $10)
Lite edition $19.95
(Save $5)
Buy Now
newsLatest News

novaPDF 5.4 released
February 11, 2008

What’s new (read more):
 » Added Copy Text/Image Watermarks dialog
 » Added "Lookup Address" option when sending emails
 » Corrected rotated and vertical texts conversion
 » Corrected conversion from WordArt, MS Word backgrounds and MS Visio drawings
 » Unistaller deletes now the driver files

newsletter News via Email | rss feed News via RSS
sdkDeveloper Tools

novaPDF SDK is a software development toolkit that can be used by software developers and programmers to add the ability to create PDF files in their applications.
novaPDF OEM is a PDF solution that programmers can use to generate PDF files that will be post-processed by their applications. […]

Reviews & User QuotesPDF Creator Reviews

"novaPDF is a really neat tool. Basically, it’s a PDF printer driver that prints to a PDF file instead of paper.

See more reviews about nova PDF
[…] novaPDF is a great product that works without forcing the user to configure anything. The convenience alone is worth the money." […]

Jason Pullara, Editor
Currently supported languagesLanguages

News:
- Finnish and Arabic languages added.
- Spanish, French, Swedish and Chinese Traditional languages updated.

Help us translate novaPDF and we will give you licenses for novaPDF Professional and mention you on the Languages page. […]

awardsAwards

novaPDF received the Editor’s Pick from Soft32, a major download site:

PDF creator reviews

See the Awards page for more ratings.

knowledgebaseKnowledgebase articles

Latest articles on how to:
 » Create PDF files
 » Convert JPG to PDF
 » Convert Powerpoint to PDF
 » Convert Publisher to PDF
 » Convert web pages to PDF
Full article list in the knowledgebase.