convert byte array to pdf mvc : Converting pdf to html format SDK software service wpf winforms web page dnn FR4.6.ProgrammerManual-en0-part1934

© 1998-2008 Fast Reports Inc.
FastReport 4.6
Programmer's
manual
Converting pdf to html format - Convert PDF to html files in C#.net, ASP.NET MVC, WinForms, WPF application
How to Convert PDF to HTML Webpage with C# PDF Conversion SDK
export pdf to html; convert pdf into html email
Converting pdf to html format - VB.NET PDF Convert to HTML SDK: Convert PDF to html files in vb.net, ASP.NET MVC, WinForms, WPF application
PDF to HTML Webpage Converter SDK for VB.NET PDF to HTML Conversion
pdf to html converter; change pdf to html
FastReport 4.6 Programmer's manual
I
© 1998-2008 Fast Reports Inc.
Table of contents
Chapter I
Working with TfrxReport
component
2
................................................................................................................................... 2
1
Loading and saving a report 
................................................................................................................................... 3
2
Designing a report 
................................................................................................................................... 3
3
Running a report 
................................................................................................................................... 4
4
Previewing a report 
................................................................................................................................... 4
5
Printing a report 
................................................................................................................................... 4
6
Loading and saving a finished report 
................................................................................................................................... 5
7
Exporting a report 
................................................................................................................................... 5
8
Creating a custom preview window 
................................................................................................................................... 6
9
Building a composite report (batch printing) 
......................................................................................................................................................... 7
Numbering of pages in a composite report 
......................................................................................................................................................... 7
Combination of pages in a composite report 
................................................................................................................................... 7
10
Interactive reports 
................................................................................................................................... 9
11
Access report objects from a code 
................................................................................................................................... 10
12
Creating a report form from code 
................................................................................................................................... 13
13
Creating a dialogue form from a code 
................................................................................................................................... 14
14
Modifying report page’s properties 
................................................................................................................................... 15
15
Report construction with the help of a code 
................................................................................................................................... 18
16
Printing an array 
................................................................................................................................... 19
17
Printing a TStringList 
................................................................................................................................... 19
18
Printing a file 
................................................................................................................................... 19
19
Printing a TStringGrid 
................................................................................................................................... 20
20
Printing TTable and TQuery 
................................................................................................................................... 20
21
Report inheritance 
................................................................................................................................... 22
22
Multithreading 
................................................................................................................................... 23
23
Reports caching 
................................................................................................................................... 23
24
MDI architecture 
Chapter II
Working with a list of variables
26
................................................................................................................................... 27
1
Creating a list of variables 
................................................................................................................................... 28
2
Clearing a list of variables 
................................................................................................................................... 28
3
Adding a category 
................................................................................................................................... 29
4
Adding a variable 
................................................................................................................................... 30
5
Deleting a variable 
................................................................................................................................... 30
6
Deleting a category 
VB.NET Image: Tutorial for Converting Image and Document in VB.NET
image to byte array or stream and convert Word or PDF document to image format. VB.NET Project for Converting Image to Byte Array, Convert Word to
convert pdf to html online for; convert pdf to web form
C# PDF Convert to SVG SDK: Convert PDF to SVG files in C#.net, ASP
Support converting PDF document to SVG image within C# PDFDocument(@"C:\input.pdf"); pdf.ConvertToVectorImages(ContextType Description: Convert to html/svg files
convert pdf to web link; convert pdf into html online
II
Table of contents
© 1998-2008 Fast Reports Inc.
................................................................................................................................... 30
7
Modifying the variable’s value 
................................................................................................................................... 32
8
Script variables 
................................................................................................................................... 32
9
Passing a variable value in the TfrxReport.OnGetValue 
Chapter III
Working with styles
35
................................................................................................................................... 37
1
Creation of style sets 
................................................................................................................................... 39
2
Modifying/adding/deleting a style 
................................................................................................................................... 40
3
Saving/restoring a set 
................................................................................................................................... 41
4
Clear report styles 
................................................................................................................................... 41
5
Styles library creation 
................................................................................................................................... 42
6
Displaying a list of style sets, and application of a selected style 
................................................................................................................................... 42
7
Modification/adding/deleting of a styles set 
................................................................................................................................... 43
8
Saving and loading a styles library 
C# PDF Convert to Images SDK: Convert PDF to png, gif images in C#
C#.NET DLLs Solution for Converting Images to PDF in C#.NET. Description: Convert all the PDF pages to target format images and output into the directory.
convert url pdf to word; adding pdf to html page
VB.NET PDF Convert to Tiff SDK: Convert PDF to tiff images in vb.
When converting PDF document to TIFF image using VB.NET program, do you know about TIFF image format? Originally, TIFF stands for
add pdf to website html; convert from pdf to html
© 1998-2008 Fast Reports Inc.
FastReport 4.6 Programmer's manual
I
C# Raster - Raster Conversion & Rendering in C#.NET
This image converting library component offers reliable C#.NET image rendering APIs for developers This tutorial page is a guide of ico format and offers you a
convert pdf to html code c#; converter pdf to html
Convert Image & Documents Formats in Web Viewer| Online Tutorials
for converting image & documents in HTML Document Image page provides detailed information for converting images or RasterEdge OCR Engine; PDF Reading; Encode &
pdf to html conversion; convert pdf to html format
Chapter
I
Working with
TfrxReport
component
C# PDF Converter Library SDK to convert PDF to other file formats
This PDF document converting library component offers reliable C#.NET PDF If you want to transform and convert PDF document to HTML file format, this
convert pdf form to html; embed pdf into web page
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
watermark and save PDF text, image, table, hyperlink and bookmark to Word without losing format. Powerful components for batch converting PDF documents in C#
convert pdf to web pages; converting pdf to html
2
FastReport 4.6 Programmer's manual
© 1998-2008 Fast Reports Inc.
1.1
Loading and saving a report
By default, a report form is stored together with the project form, i.e. in a DFM
file. In most cases, no more operations required, and you thus would not need to take
special measures to load a report. If you decided to store a report form in a file or in the
DB BLOb-field (this provides great flexibility, i.e. you can modify a report without
recompiling the program), you would have to use the “TfrxReport” methods for report
loading and saving:
function LoadFromFile(const FileName: String; ExceptionIfNotFound:
Boolean = False): Boolean;
Loads a report from the file with the given name. If the second parameter is equal to
“True” and the file is not found, then it generates an exception. If the file is loaded
successfully, it returns “True.”
procedure
LoadFromStream(Stream: TStream);
Loads a report from the stream. 
procedure
SaveToFile(
const
FileName: 
String
);
Saves a report to a file with the specified name.
procedure SaveToStream(Stream: TStream);
Saves a report to a stream.
File with a report form has the “FR3” extension by default.
Examples:
Pascal:
frxReport1.LoadFromFile('c:\1.fr3');
frxReport1.SaveToFile('c:\2.fr3');
C++:
frxReport1->LoadFromFile("c:\\1.fr3");
frxReport1->SaveToFile("c:\\2.fr3");
3
Working with TfrxReport component
© 1998-2008 Fast Reports Inc.
1.2
Designing a report
Calling the report designer is performed via the “TfrxReport.DesignReport”
method. A designer must be included in your project (it is enough to either use the
“TfrxDesigner” component, or add the “frxDesgn” unit into the uses list).
The "DesignReport" method takes two default parameters: 
procedure DesignReport(Modal: Boolean = True; MDIChild: Boolean = False);
The Modal parameter determines whether the designer should be modal. The
MDIChild parameter allows to make a designer window a MDI child window.
Example:
frxReport1.DesignReport;
1.3
Running a report
Applying one of the following two “TfrxReport” methods starts a report:
procedure
ShowReport(ClearLastReport: Boolean = True);
Starts a report and displays the result in the preview window. If the “ClearLastReport”
parameter is equal to “False,” then the report will be added to the previously constructed
one, otherwise the previously constructed report will be cleared (by default).
function PrepareReport(ClearLastReport: Boolean = True): Boolean;
Starts a report, without opening the preview window. The parameter assignment is the
same as in the “ShowReport” method. If a report was constructed successfully, it returns
“True.”
In most cases, it is more convenient to use the first method. It displays the preview
window right away, while a report continues to be constructed.
The “ClearLastReport” parameter is convenient to use in case when it is necessary to add
another report to the previously constructed one (such technique is used for batch report
printing). 
Example:
frxReport1.ShowReport;
4
FastReport 4.6 Programmer's manual
© 1998-2008 Fast Reports Inc.
1.4
Previewing a report
It is possible to display a report in the preview window in two ways: either by
calling the “TfrxReport.ShowReport”  method (described above), or with the help of the
“TfrxReport.ShowPreparedReport” method. In the second case, the report construction is
not performed, but a finished report is displayed. That means, that you should either
construct it beforehand with the help of the “PrepareReport” method, or load a previously
constructed report from the file (see “Loading/saving a finished report”).
Example:
Pascal:
if
frxReport1.PrepareReport 
then
frxReport1.ShowPreparedReport;
C++:
if(
frxReport1->PrepareReport(true))
frxReport1->ShowPreparedReport();
In this case, report construction is finished first, and after that it is displayed in the
preview window. Construction of a large report can take a lot of time, and that is why it is
better to use the “ShowReport anisochronous” method, than the
“PrepareReport/ShowPreparedReport” one. One can assign preview settings by default
via the “TfrxReport.PreviewOptions” property.
1.5
Printing a report
In most cases, you will print a report from the preview window. To print a report
manually, you should use the “TfrxReport.Print” method, for example:
frxReport1.LoadFromFile(...);
frxReport1.PrepareReport;
frxReport1.Print;
At the same time, the dialogue, in which printing parameters can be set, will
appear. You can assign settings by default, and disable a printing dialogue with the help
of the “TfrxReport.PrintOptions” property.
1.6
Loading and saving a finished report
It can be executed from the preview window. This also can be performed
manually with the help of the “TfrxReport.PreviewPages” methods:
5
Working with TfrxReport component
© 1998-2008 Fast Reports Inc.
function LoadFromFile(const FileName: String; ExceptionIfNotFound:
Boolean = False): Boolean;
procedure
SaveToFile(const FileName: String);
procedure LoadFromStream(Stream: TStream);
procedure SaveToStream(Stream: TStream);
Assignment and the parameters are similar to the corresponding TfrxReport
methods. A file, which contains the finished report, has “FP3” extension by default.
Example:
Pascal:
frxReport1.PreviewPages.LoadFromFile('c:\1.fp3');
frxReport1.ShowPreparedReport;
C++:
frxReport1->PreviewPages->LoadFromFile("c:\\1.fp3");
frxReport1->ShowPreparedReport();
Note, that after finished report loading is completed, its previewing is executed via
the “ShowPreparedReport” method!
1.7
Exporting a report
It can be performed from a preview window. The operation can also be executed
manually, via the “TfrxReport.Export” method. In the parameter of this method you
should specify the export filter you want to use:
frxReport1.Export(frxHTMLExport1);
The export filter component must be available (you must put it on the form of
your project) and be adjusted correctly.
1.8
Creating a custom preview window
FastReport displays reports in the standard preview window. If it does not suit you
for some reason, a custom preview form may be created. For this purpose, the
“TfrxPreview” component from the FastReport component palette was designed. To
display a report, the link to this component should be assigned to the
“TfrxReport.Preview” property.
There is two typical problems when using TfrxPreview component. It does not
handle keys (arrows, PgUp, PgDown etc) and mouse wheel (if any). To make
6
FastReport 4.6 Programmer's manual
© 1998-2008 Fast Reports Inc.
TfrxPreview working with keys, pass the focus to it (it can be done, for example, in the
OnShow event handler of a form):
frxPreview.SetFocus;
To make TfrxPreview working with mouse scroll, you have to create
OnMouseWheel event handler of a form and call TfrxPreview.MouseWheelScroll method
in this handler:
procedure
TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState; 
WheelDelta: Integer; MousePos: TPoint; 
var
Handled: Boolean);
begin
frxPreview1.MouseWheelScroll(WheelDelta);
end
;
1.9
Building a composite report (batch printing)
In some cases it is required to organize printing of several reports at once, or
capsulate and present several reports in one preview window. To perform this, there are
tools in FastReport, which allow building a new report in addition to an already existing
one. The «TfrxReport.PrepareReport» method has the optional «ClearLastReport»
Boolean parameter, which is equal to «True» by default. This parameter defines whether
it is necessary to clear pages of the previously built report. The following code shows how
to build a batch from two reports:
Pascal:
frxReport1.LoadFromFile('1.fr3');
frxReport1.PrepareReport;
frxReport1.LoadFromFile('2.fr3');
frxReport1.PrepareReport(False);
frxReport1.ShowPreparedReport;
C++:
frxReport1->LoadFromFile("1.fr3");
frxReport1->PrepareReport(true);
frxReport1->LoadFromFile("2.fr3");
frxReport1->PrepareReport(false);
frxReport1->ShowPreparedReport();
We load the first report and build it without displaying. Then we load the second
one into the same «TfrxReport» object and build it with the «ClearLastReport» parameter,
equal to «False». This allows the second report to be added to the one previously built.
After that, we display a finished report in the preview window.
Documents you may be interested
Documents you may be interested