DynaPDF Manual - Page 732

Previous Page 731   Index   Next Page 733

Function Reference
Page 732 of 770
pdf := nil;
try
pdf := TPDF.Create;
pdf.SetOnErrorProc(nil, @ErrProc);
pdf.SetUseGlobalImpFiles(true);
// No conversion to templates is required. In addition, we need the
// page contents only.
pdf.SetImportFlags(ifImportAsPage);
pdf.OpenImportFileA('c:/test.pdf', ptOpen, '');
// In the following loop we create a new PDF file, import one page
// and close the new file. We continue until all pages are stored
// in a new PDF file each.
// We store the files in the directory c:/SplitOut. Note that the
// size of all single page files is many times larger as the size
// of the original import file because used fonts and other
// resources must be exported to each file, they cannot be shared.
for i := 1 to pdf.GetInPageCount do begin
pdf.CreateNewPDFA(Format('c:/SplitOut/split%.4d.pdf', [i]));
pdf.Append;
pdf.ImportPageEx(i, 1.0, 1.0); // Import a page
pdf.EndPage;
pdf.CloseFile;
end;
except
on E: Exception do MessageDlg(E.Message, mtError, [mbOK], 0);
end;
if pdf <> nil then pdf.Free;
end;
SetUseImageInterpolation
Syntax:
LBOOL pdfSetUseImageInterpolation(
const PPDF* IPDF, // Instance pointer
UI32 Handle,
// Image handle
LBOOL Value)
// Value
The function enables or disables image interpolation explictely for a given image. If nothing was
specified (this is the default), a viewer applications can only use a heuristic to determine whether
image interpolation should be enabled or not. The result is then of course application specific.
The parameter Handle must be a valid image handle that was returned by a DynaPDF function like
InsertImage(), InsertImageEx(), or InsertImageFromBuffer(), for example.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetUseGlobalImpFiles

Next topic: SetUseImageInterpolationEx, SetUserUnit, SetUseStdFonts