-
Notifications
You must be signed in to change notification settings - Fork 1
/
jToPDF32.dpr
53 lines (46 loc) · 1.12 KB
/
jToPDF32.dpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
program jToPDF32;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
preparingreport in 'preparingreport.pas',
u02 in 'u02.pas',
u03 in 'u03.pas';
procedure GenRap(strIn: string; strOut: string);
var
Preparingreport : TPreparingreport;
begin
try
Preparingreport := TPreparingreport.Create();
try
Preparingreport.reporDefName := strIn;
Preparingreport.id_PDF_file_str := '';
Preparingreport.pathToPdf := strOut;
Preparingreport.FUpdateUIEvent := Preparingreport._UpdateUI;
Preparingreport.FEndUpdateUIEvent := Preparingreport._EndUpdateUI;
Preparingreport.Start;
finally
Preparingreport.free;
end;
except
on E: Exception do
begin
Writeln(E.Message);
end;
end;
end;
begin
try
var strIn: string := ParamStr(1);
var strOut: string := ParamStr(2);
if (Length(strIn) > 0) then
begin
if Length(strOut) = 0 then
strOut := GetCurrentDir();
GenRap(strIn,strOut);
end;
except
on E: Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end.