EforiaLog pdflib - A PDF-Library for tdbengine
About this documentation

The pdflib and all its methods, properties and error codes are described on these pages. This is a reference documentation, not a programming guide. Please refer to the example(s) that come with the EASY pdflib to get things started.


The pdflib includes the following components:

Files:

../sysmod/.mod – tdbmodule containing procedures to create a PDF-document;
../fonts/Courier.fm – font file for Courier font;
../fonts/Courier-Bold.fm – font file for Courier Bold font;
../fonts/Courier-Oblique.fm – font file for Courier Oblique font;
../fonts/Courier-BoldOblique.fm– font file for Courier Bold Oblique font;
../fonts/Helvetica.fm – font file for Helvetica font;
../fonts/Helvetica-Bold.fm – font file for Helvetica Bold font;
../fonts/Helvetica-Oblique.fm – font file for Helvetica Oblique font;
../fonts/Helvetica-BoldOblique.fm – font file for Helvetica Bold Oblique font;
../fonts/Times-Roman.fm – font file for Times-Roman font;
../fonts/Times-Bold.fm – font file for Times Bold font;
../fonts/Times-Italic.fm – font file for Times Italic font;
../fonts/Times-BoldItalic.fm – font file for Times Bold Italic font;
../fonts/Symbol.fm – font file for Symbol font;
../fonts/ZapfDingbats.fm – font file for Symbol font;
../symbols/Symbols.txt – file containing symbols that have been changed for correct display of some special chars such as German umlauts and symbols \, %, (, ), >, <, [, ], {,}.


Directories:

../export/ – directory to save PDF-documents;
../fonts/ – directory containing font files;
../images/ – directory containing image files to be inserted into PDF-documents;
../symbols/ – directory containing symbol files
../sysmod/ – directory containing files with functions to create PDF-document;


Specification of the block of function to create PDF-documents

The aim - to have PDF-funcions that provide the possibility to create PDF-files and use them for putting out information equally with TXT-files using tdbengine. Providing the ability to create PDF-documents is realized by four blocks of functions: general and font functions, text, graphic and image output functions. All of them have the ability of error handling.


List of functions

General functions


1. pdf_new(filename, mode: String): Integer
2. pdf_close(handle: Integer): Integer
3. pdf_begin_page(handle: Integer; width, height, leftmargin, rightmargin, topmargin,bottommargin: Real): Integer
4. pdf_goto_xy(handle: Integer; x, y: Real)
5. pdf_get_x(handle : Integer) : Real
6. pdf_get_y(handle : Integer) : Real
7. pdf_set_author(handle: Integer; author: String): Integer
8. pdf_set_creation_date(handle: Integer; date: String): Integer
9. pdf_set_title(handle: Integer; title: String) : Integer
10. pdf_set_subject(handle: Integer; subject: String) : Integer
11. pdf_header_init(handle : Integer; FontName : String; FontSize : Real) : Integer
12. pdf_header_add(handle : Integer; Alignment, text : String; Ratio : Real) : Integer
13. pdf_header_delete(handle : Integer) : Integer
14. pdf_footer_init(handle : Integer; FontName : String; FontSize : Real) : Integer
15. pdf_footer_add(handle : Integer; Alignment, text : String; Ratio : Real) : Integer
16. pdf_footer_delete(handle : Integer) : Integer
17. pdf_page_border(handle, LineWidth, DashPattern, Red, Green, Blue : Integer) : Integer

The Text output

18. pdf_write_xy(handle: Integer; x, y: Real; text: String): Integer
19. pdf_write(handle: Integer; text: String): Integer
20. pdf_writeln(handle: Integer; text: String): Integer
21. pdf_write_underlined(handle : Integer; text : String) : Integer
22. pdf_write_superscript(handle : Integer; textr : String) : Integer
23. pdf_write_subscript(handle : Integer; text : String) : Integer
24. pdf_str_output(handle : Integer; text : String; justify : String; lm, rm : Real) : Integer
25. pdf_ramtext_output(handle : Integer; ramtxt : String; justify : String; lm, rm : Real) : Integer
26. pdf_file_output(handle : Integer; file : String; justify : String; lm, rm : Real; mode : Integer) : Integer
27. pdf_write_table_string(handle : Integer; arrStr, arrAlignment : String[,];arrColWidth : Real[]; line_par : Integer) : Integer
28. pdf_array2table(handle : Integer; arrStr, arrAlignment : String[,]; arrColWidth : Real[]; table_justify : String; every_page_header, every_row_line : Integer) : Integer
29. pdf_dat2table(handle, TableWidth : Integer; ColumnsWidth : Real[]; FieldNames : String[]; dbPath, Pssw : String; Format : Integer) : Integer
30. pdf_string_width(handle: Integer; text: String): Integer

The Font properties

31. pdf_find_font(font: String): Integer
32. pdf_set_font(handle: Integer; font: String; font_size: Real): Integer
33. pdf_set_font_size(handle: Integer; font_size: Real): Integer
34. pdf_set_char_space(handle: Integer; size: Real): Integer
35. pdf_set_word_space(handle: Integer; size: Real): Integer
36. pdf_set_horizontal_scaling(handle: Integer; size: Real): Integer
37. pdf_set_leading(handle: Integer; size: Real): Integer
38. pdf_set_rendering_mode (handle: Integer; mode: Integer): Integer
39. pdf_set_rise(handle : Integer; value : Integer) : Integer
40. pdf_set_text_rgbcolor(handle : Integer; red, green, blue : Real) : Integer

Functions for drawing

41. pdf_set_line_width(handle : Integer; width : Real) : Integer
42. pdf_set_dash(handle : Integer; type : Integer) : Integer
43. pdf_set_rgbcolor_fill(handle : Integer; red, green, blue : Real) : Integer
44. pdf_set_rgbcolor_stroke(handle : Integer; red, green, blue : Real) : Integer
45. pdf_set_rgbcolor(handle : Integer; red, green, blue : Real) : Integer
46. pdf_lineto(handle : Integer; x_end, y_end : Real) : Integer
47. pdf_line_xy(handle : Integer; x_start, y_start, x_end, y_end : Real) : Integer
48. pdf_rectangle(handle : Integer; x, y, width, height : Real) : Integer
49. pdf_polygon(handle : Integer; x, y, radius : Real; count : Integer) : Integer
50. pdf_image(handle: Integer; filename: String, x, y, coef: Real; angle: Integer): Integer
51. pdf_image_xy(handle : Integer; file_name : String; x1, y1, x2, y2 : Real; angle : Integer) : Integer
52. pdf_get_img_height(file_name : String) : Integer
53. pdf_get_img_width(file_name : String) : Integer


Description of error codes


Date: 2004/04/08
Created by tdb Software Service GmbH.