 |
Example 1: Crop a PDF file (Delphi) |
|
 |
uses ComObj;
.....
procedure TForm1.Button1Click(Sender: TObject);
var
NVresize : Variant;
retVal : Integer;
begin
NVresize := CreateOleObject('PDFresize.Neevia');
NVresize.Paper := 'letter';
NVresize.Orientation := 2;
NVresize.Scale := false;
retVal := NVresize.ResizePDF('c:\in.pdf', 'c:\out.pdf');
if retVal <> 0 then
Application.MessageBox(PChar('Error code=' + IntToStr(retVal)),'',0)
else
Application.MessageBox('Done','',0);
end;
|
|
 |
|