I'm using ImageEn 9.2.0. I've tried to attach the tiff (27MB), but keep getting the following error:
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
/ieforum/outputFile.asp, line 71
Here is the code I'm using.
procedure TForm1.Button1Click(Sender: TObject);
begin
var mv := TImageEnMView.Create(nil);
try
mv.MIO.LoadFromFileTIFF('..\..\memo.tiff');
PrintTIFFPages(mv);
finally
mv.Free;
end;
end;
function TForm1.PrintTIFFPages(ATifObject: TImageEnMView;
AAutoRotate: Boolean = True; AStartPage: integer = 0; AEndPage: integer = -1): Boolean;
var
l_index: integer;
FirstPage: Boolean;
begin
Result := True;
FirstPage := True;
if ATifObject.ImageCount = 0 then
Exit;
if (AEndPage = -1) or (AEndPage > ATifObject.ImageCount-1) then
AEndPage := ATifObject.ImageCount-1;
Printer.Title := 'Docman';
// If Printing to a file (i.e. PDF) the request for a file name occurs here.
Printer.BeginDoc;
try
// User canceled printing (This happens when printing to PDF and user cancels when requesting a file name)
if not Printer.Printing then
begin
Result := False;
Exit;
end;
for l_index := AStartPage to AEndPage do
begin
// Check incase user aborted print job
if not Printer.Printing then
begin
Result := False;
Exit;
end;
// -----------------------------------------------------------------------------------
// There was code here to modify the image that I've removed to simplify the example.
// -----------------------------------------------------------------------------------
if not FirstPage then
Printer.NewPage;
FirstPage := False;
ATifObject.MIO.PrintImage(l_index, nil,0,0,0,0);
end;
finally
if Printer.Printing then
Printer.EndDoc;
end;
end;