Print2eDoc SDK
SDK for document conversion to PDF, PNG, JPEG, TIFF...
Compatibility
VB VB.NET VC++ C# Delphi

Document File Format Conversion With Print2eDoc SDK (Part 3)

Learn how to program Gnostice Print2eDoc Add-Ins for Microsoft® Word, Excel, PowerPoint applications.
By Shivaranjini M.
Important

This product has been discontinued. Please check our old products page for more information.

Gnostice Print2eDoc printer driver takes the "print command" output of any Windows application as input for its file conversion jobs. With Microsoft® Office® applications such as Word™, Excel™ and PowerPoint™, it offers certain extra features via the Add-Ins.

For example, the Add-In for Microsoft® Word, offers the user the choice of converting navigational and other elements of the Word document, such as Table of contents, bookmarks, comments, etc., to corresponding document elements in the output PDF document. With the Microsoft® Excel Add-In, users can choose to create bookmarks named after individual worksheets. They can choose to convert the entire workbook or just the active worksheet. Similarly, the Microsoft® PowerPoint Add-In allows users the choice of converting presentation outlines and text to PDF bookmarks. They can also choose to converts presentation hyperlinks to PDF links.

You can do all of this programmatically using Gnostice Print2eDoc SDK. Specifically, the methods to use are:

These methods are used in place of the regular PrintDocument() method. When any of these methods is called, the relevant advanced document creation settings specified in the current profile will be used to create the output PDF document. In other words, the values specified for the relevant properties of the IgtPrint2eDoc.OfficeAddinSettings object will be applied when converting a Microsoft Word document or an Excel workbook or a PowerPoint presentation. For example, when converting a Microsoft Word document, the OfficeAddinSettings properties that come into play are:

Based on your output requirements, you can choose to modify these property values, prior to calling PrintWordDocument(). Here is an example.

Dim PrinterObj As New gtPrint2eDoc

With PrinterObj.OfficeAddinSettings
  .WordDocumentPropertiestoDocumentInfo = True
  .WordBookmarksToBookmarks = True
  .WordCommentsToPDFNotes = True
  .WordHeadingsToBookmarks = True
  .WordHiddenBookmarksToBookmarks = False
  .WordHyperlinksToLinks = True
  .WordLinkBorderColor = RGB(0, 0, 255)
  .WordNotesColor = RGB(0, 255, 0)
End With

PrinterObj.PrintWordDocument("C:\input.doc")

You can obtain the same effect by using the old PrintDocument() method but after setting the SourceApplication property to MSWord.

PrinterObj.SourceApplication = MSWord
PrinterObj.PrintDocument("c:\input.doc")
Privacy | Legal | Feedback | Newsletter © 2002-2010 Gnostice Information Technologies Private Limited. All rights reserved.

This site is best viewed on a screen with minimum resolution of 1152 x 864 pixels. Windows users are advised to use Microsoft ClearType Tuning for optimal experience. Linux and other users can enable font smoothing, as supported by their OS. Also, please use the latest version of a standards-compliant browser such as Opera, FireFox, Chrome or Safari.