⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdftotif.dpr

📁 ImageMagick library of image with Visual C++6
💻 DPR
字号:
program PdfToTif;
{$APPTYPE CONSOLE}

{
  This commandline tool shows how to use MagickImage for conversion from
  PDF to TIF
}

uses
  SysUtils,
  MagickImage;

var
  i, NumPages: integer;
  AFileName: string;
  Img: TMagickImage;
  S, T: string;

begin
  Img := TMagickImage.Create;
  if ParamCount > 0 then begin

    AFileName := ParamStr(1);
    T := ExtractFileName(AFileName);
    S := Copy(T, 1, Pos('.', T) - 1);

    // Determine number of pages in PDF
    Img.ImageInfo.Ping := True;
    Img.LoadFromFile(AFilename);
    NumPages := Img.FrameCount;

    // Page numbers start at 0
    for i := 0 to NumPages - 1 do with Img do begin

      // Remove old picture / info
      Clear;

      // Set defaults
      Resolution := 200; // The resolution at which to read

      // Set the page number (and just one page to load)
      ImageInfo.Scene := i;
      ImageInfo.NumberScenes := 1;

      // Load the images
      LoadFromFile(AFileName);

      // And save the result to TIF
      SaveToFile('C:\Temp\Tif\' + S + IntToStr(i + 1) + '.tif');
    end;

  end;
  Img.Free;
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -