[go: up one dir, main page]

0% found this document useful (0 votes)
106 views7 pages

Demo Information and Execution Instructions: Gnostice Edocengine Demo Notes

This document provides instructions on how to run demos of an electronic document creation engine. There are 4 demos that demonstrate: 1) creating documents programmatically, 2) exporting reports from various reporting tools to document formats, 3) combining output from multiple reporting tools into a single document, and 4) creating web applications that dynamically generate documents. Each demo includes instructions on how to run and create the demo applications.

Uploaded by

Javier Muñoz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views7 pages

Demo Information and Execution Instructions: Gnostice Edocengine Demo Notes

This document provides instructions on how to run demos of an electronic document creation engine. There are 4 demos that demonstrate: 1) creating documents programmatically, 2) exporting reports from various reporting tools to document formats, 3) combining output from multiple reporting tools into a single document, and 4) creating web applications that dynamically generate documents. Each demo includes instructions on how to run and create the demo applications.

Uploaded by

Javier Muñoz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

Gnostice

eDocEngine Demo Notes

This document provides instructions on how to run the demos and a description of how they
were created. The demos are organized in the same order and have the same serial number as
the folders included in the <eDocEngine Install Dir>\Demos\ directory.

Demo Information and Execution Instructions


1. Document Creation Samples
This application demonstrates the generic electronic document creation API of eDocEngine to
create high quality electronic documents. It starts with the simplest blank page document and
goes on to implement the advanced formatting functions of eDocEngine. Examples of drawing
text, graphics, images and metafiles, inserting watermarks, headers and footers, drawing tables
and formatting paragraphs, creating PDF forms and more are included in the demo code. It also
highlights how one piece of code can be used to create a particular document in about 20
formats.

How do I run it?


 Invoke the application DocCreate.exe located in the folder 1. DocCreateSamples
 Select document type and click a button for the sample document you want created
If the Open After Create switch was turned on, the document should open automatically.

How do I create it?


 Start a new application and place the Engine components you need, from the eDocEngine
page of the Component Palette
 Call the appropriate methods of the engine component to create the required document
 If you maintain the current selected engine in a variable of a higher engine class (such as
TgtDocumentEngine) in which some document creation methods are not accessible, you
may type cast the variable to IgtDocumentEngine interface to get access to all the methods
of the actual engine assigned to the variable
Please take a look at the source code of the demo to know more.

www.gnostice.com
Gnostice
eDocEngine Demo Notes

2. Exporting
These applications demonstrate how the existing VCL (third-party and standard) components,
such as reporting tools, user-interface components, RTF and HTML controls, can be easily
interfaced with eDocEngine to produce documents in the 20 formats with hardly any code.
eDocEngine can export from virtually any VCL component that can draw itself to a Canvas.

How do I run it?


 Invoke the application from the respective folders. A report should load up in the view
 Click Export Report and choose the file type and provide a file name
 Configure the Engine in the dialog that comes up and click Ok, you should see the exported
report open in the appropriate viewer automatically
 To export your own reports from the demo application, save your reports in the native format
of the reporting tool (file extensions given below), load it in the application and export as
above

How do I create it?


 You should have first installed the necessary Export Interface component. The Installation
section in the help file has details
 Create your report as usual and place the appropriate Export Interface component from the
eDocEngine Additional page of the component palette on to the main form or the report
form (see below for exact class names) of your application
 Place an engine component from the eDocEngine page along with the Export Interface
component
 Set the Engine property of the Export Interface component by selecting the Engine
component you placed along with it
 Done! A new file type selection, matching the Engine you placed on the form, should appear
in the Save/Print dialog of the reports Preview form
 To be able to export to another format, place a new Export Interface component and a new
Engine component, and connect them as above
 Reports can also be exported programmatically with just one line of code. The help file has
details

2.1. ReportBuilder (native file type: .RAF)


For exporting from ReportBuilder, use the TgtRBExportInterface component. Remember to
set the AllowPrintToFile property of the ppReport component to True.

2.2. RaveReports (native file type: .NDR)


For exporting from Rave, use the TgtRaveExportInterface component.

2.3. FastReport (native file type: .FRP)


For exporting from FastReport, use the TgtFRExportInterface component.

2.4. QuickReport (native file type: .QRP)


For exporting from QuickReport, use the TgtQRExportInterface component.

2.5. AceReporter (native file type: .ACE)


For exporting from Ace, use the TgtAceExportInterface component.

2.6. DeveloperExpress Printing System


For exporting from DeveloperExpress Printing System, use the TgtXPressPrntInterface
component. Call the RenderDocument method of the component passing your
dxComponentPrinter component, to invoke the export.

2.7. GmPrintSuite
For exporting from GmPrintSuite, use the TgtGmSuiteInterface component. Call the
RenderDocument method of the component passing your TGmPreview component, to
invoke the export.

www.gnostice.com
Gnostice
eDocEngine Demo Notes

2.8. THtmlViewer
For exporting from THtmlViewer, use the TgtHtmlViewInterface component. Call the
RenderDocument method of the component passing your THTMLViewer component or a
string containing path to HTML file, to invoke the export.

2.9. TRichView
For exporting from TRichView, use the TgtRichViewInterface component. Call the
RenderDocument method of the component passing your TRVPrint or TRVReportHelper
component, to invoke the export.

It is easy to implement new interface components for other VCL components. See the source
code for the existing interface components. Please email support@gnostice.com for assistance in
implementing support for exporting from other components. To see how converting HTML and
RTF works, try the Gnostice ONEView application from www.gnostice.com.

www.gnostice.com
Gnostice
eDocEngine Demo Notes

3. E Pluribus Unum – Out of many, one


This report demonstrates the control that eDocEngine provides over the exporting and creation of
electronic documents. You can output reports created in different reporting tools, harnessing the
specific strengths of each, insert your own custom content with the help of the rich API, all as a
single PDF/RTF/HTML document that can be read as one.

How do I run it?


 Invoke the application OutOfManyOne.exe located in the folder 3. OutOfManyOne
 Click Export Report and a PDF document containing all the pages created using five popular
reporting tools should open automatically

How do I create it?


 You should have first installed the necessary Export Interface components. The Installation
section in the help file has details
 Create the report in each reporting tool as usual and place the appropriate Export Interface
components from the eDocEngine Additional page of the component palette, on to the main
form or the report form of your application
 Place an engine component from the eDocEngine page to connect to each of the Export
Interface components
 Set the Engine property of the Export Interface components by selecting the Engine
components you placed along with it
 Place a button and program its OnClick event handler setting the Export Interface
components’ DoBeginDoc and DoEndDoc properties to False/True appropriately
 Set the FileName property of the engine component and call the ExportReport methods of
each Export Interface component
Please take a look at the source code of the demo to know more.

www.gnostice.com
Gnostice
eDocEngine Demo Notes

4. Web Server Applications


These applications demonstrate the facilities provided by eDocEngine to create web server
applications that serve dynamically generated documents over the web. These facilities are
specifically designed and optimized to make web server application development extremely easy
and also run efficiently.

To run the following demos you need to first setup Demos\4. WebServer folder as a web folder
with Execute permissions. Following are some tips on setting up the web server software and web
folder:
o Make sure you have IIS or PWS installed on your system. If it is not, you can install it
through Control Panel->Add/Remove Programs. You may need your Windows CD
o Run Windows Explorer and browse to Demos\4. WebServer under the folder you
unpacked the Demos.zip file to
o Right-click Demos\4. WebServer, select Properties and open the Web Sharing page
o Select the Share this folder option, enter ‘edocweb’ for the Alias name in the dialog
that opens
o Enable Execute permissions and click OK and OK again to close the Properties
dialog

4.1. Simple Page Producer


eDocEngine provides a Page Producer component that connects to any of the Engine
components through the Engine property and streams the generated document out to clients.
This demo shows how eDocEngine can be used in Delphi’s web application development
framework for the delivery of dynamically generated documents. The application uses the
eDocEngine API to create a PDF document and stream it out straight to the client browser,
without creating a disk file.

How do I run it?


 Make sure you have the web server and web folder setup. You can follow the steps provided
above
 Open your web browser, copy the following URL into the address box and hit Enter:
http://localhost/edocweb/4.1.%20PageProducer/PageProducer.exe
A dynamically created PDF document should open automatically in your browser window.

How do I create it?


 You should have first installed the eDocEngine Doc Producer component. The Installation
section in the help file has details
 Start Delphi and create a new CGI application by choosing File | New | Other… | Web
Server Application
 Place an Engine component from the eDocEngine page of the component palette, on to the
web module
 Place a Doc Producer component from the eDocEngine Additional page and connect it to
the engine by setting its Engine property
 Right-click on the Web Module and select Action Editor
 Right-click on the Action Editor and select Add
 Set the newly created action’s Default property to True and the Producer property to the Doc
Producer component
 Write your document creation code in the Doc Producer component’s OnCreateContent event
handler, by calling the document creation methods on Sender.Engine
 Compile the application
 Run it through your web browser as explained above
Please take a look at the source code of the demo to know more.

www.gnostice.com
Gnostice
eDocEngine Demo Notes

4.2. Report Export with Page Producer


The Page Producer component also has the versatility of connecting to an Export Interface
component thereby enabling the rapid creation of web applications that serve dynamic reports.
This demo shows how eDocEngine can be used in Delphi’s web application development
framework along with QuickReport (any visual or code based reporting tool can be used) for the
delivery of dynamically generated reports over the web.

How do I run it?


 Make sure you have the web server and web folder setup. You can follow the steps provided
above
 Open your web browser, copy the following URL into the address box and hit Enter:
http://localhost/edocweb/4.2.%20ReportPageProducer/ReportPageProducer.exe
A dynamically created PDF document of the report should open automatically in your browser
window.

How do I create it?


 You should have first installed the eDocEngine Doc Producer component and the QR Export
Interface. The Installation section in the help file has details
 Start Delphi and create a new CGI application by choosing File | New | Other… | Web
Server Application
 Place an Engine component from the eDocEngine page of the component palette, on to the
Web Module
 Place a QR Export Interface and a Doc Producer component from the eDocEngine
Additional page
 Connect the Export Interface component to the Engine by setting its Engine property
 Connect the Doc Producer to the Export Interface by setting its ExportInterface property
 Right-click on the Web Module and select Action Editor
 Right-click on the Action Editor and select Add
 Set the newly created action’s Default property to True and the Producer property to the Doc
Producer component
 Create a new form by choosing File | New | Form
 Design the report as you do in any other application
 Choose Project | Options | Forms and make sure the new report form is not in the Auto-
create forms list
 Add the report form’s unit name to the uses list of the Web Module
 Export the report in the Doc Producer component’s OnCreateContent event handler by calling
the ExportReport method on Sender.ExportInterface
 Compile the application
 Run it through your web browser as explained above
Please take a look at the source code of the demo to know more.

www.gnostice.com
Gnostice
eDocEngine Demo Notes

4.3. PDF Form Server


This demo exhibits the ability of eDocEngine to stream out richly formatted, live PDF forms that
can be downloaded or accessed online, and filled and submitted online. The form data can then
be received by a server and processed. This demo consists of two applications, one that creates
the PDF form and another that is the server that receives the submitted form data, posts it to an
MS Access database and also shows the entered field values in the browser window. Make sure
the Demos.zip file has been unpacked retaining all paths. The PDF form (PDFForm.pdf),
database (Company.mdb) and forms server (PDFFormServer.exe) should be present in the same
folder. You may execute CreatePDFForm.exe to recreate the PDF form file. The solution can also
be developed as a single server application that serves the PDF form and processes it.

How do I run it?


 Make sure you have the web server and web folder setup. You can follow the steps provided
above
 Open your web browser, copy the following URL into the address box and hit Enter:
http://localhost/edocweb/4.3.%20PDFFormServer/PDFForm.pdf
 Fill the PDF form that appears and hit the Submit button. The form server should
automatically start and show the submitted data in a formatted table. You can now also open
the database to see the newly added record

How do I create it?

PDF Form creation application:


 Start a standard application in Delphi and use the eDocEngine API to create the PDF form
 Include the fields, buttons and server paths and save the document
Please see the source code of the SamplePDFForm application in the DemoSource\4.3
PDFFormServer folder for more information.

PDF Processor server application


 Start Delphi and create a new CGI application by choosing File | New | Other… | Web
Server Application
 Right-click on the Web Module and select Action Editor
 Right-click on the Action Editor and select Add
 Set the newly created action’s Default property to True
 Program the OnAction event of the Action. See the demo source code for the actual code to
put in there
 Place an ADOConnection and ADOTable component on the Web Module
 Build ConnectionString of the ADOConnection using the wizard and point it to the
Company.mdb database
 Set the Connection property of the ADOTable to the ADOConnection component and select
‘tblCompany’ for the TableName property
 Compile the application
 Run it as mentioned in the instructions above
Please take a look at the source code of the demo to know more.

PDFtoolkit with eDocEngine

Using Gnostice PDFtoolkit, the PDF document management, manipulation and organization VCL,
you can extract field values from PDF forms stored on disk, programmatically. Using this feature
you can even process PDF forms received as email attachments, completely automating the
processing of electronic forms. PDFtoolkit can perform many more handy tasks on PDF
documents. For a full demo of PDFtoolkit, please have a look at the PDFWiz demo. PDFtoolkit
and PDFWiz can be found at www.gnostice.com.

www.gnostice.com

You might also like