program korean;
{$APPTYPE CONSOLE}
uses
  SysUtils, PDF, Graphics;

var
  MyPDF: TPDFDocument;
begin
  try
    MyPDF := TPDFDocument.Create(nil);
    try
      MyPDF.FileName := 'Data\PDFFiles\Korean.pdf';
      MyPDF.DocumentInfo.Title := 'llPDFLib 2 Demo [Korean Charset]';
      MyPDF.AutoLaunch := True;
      MyPDF.Compression := ctFlate;
      MyPDF.BeginDoc;
      with MyPDF.CurrentPage do
      begin
        SetRGBColorFill(0.5, 0.5, 0.5);
        BeginText;
        SetActiveFont('', [], 14, 129);
        TextOut(10, 40, 0, '이글은 한글윈도우 95에서 노트패드상에서');
        TextOut(10, 60, 0, '작성한 글입니다. 이렇게 한글에 대하여도');
        TextOut(10, 80, 0, '신경을 써주셔서 감사합니다.');
        TextOut(10, 80, 0, '황 진 수');
        EndText;
      end;
      try
        MyPDF.EndDoc;
      except
        on Exception do
        begin
          MyPDF.Abort;
          raise;
        end;
      end;
    finally
      MyPDF.Free;
    end;
  except
    on E: Exception do
      Writeln(E.message);
  end;
end.

