DynaPDF Manual - Page 799

Previous Page 798   Index   Next Page 800

Function Reference
Page 799 of 839
// No conversion to templates is required. In addition, we need the
// page contents only.
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.ImportPageEx(i, 1.0, 1.0); // Import a page
on E: Exception do MessageDlg(E.Message, mtError, [mbOK], 0);
if pdf <> nil then pdf.Free;
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 application 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