Feature Request for New PDF Library

Dear Mr. Maughan,


1) The DPI is based on the printer settings. The PDF page width and height can be set to various formats such as A4, A3, Letter, ....
2) This is possible using the AdvGraphicsPDFEngine in combination with AdvPDFLib for advanced graphics path constructions. Please take a look at the sample below.
3) This is unfortunately not possible, but we have added this on our feature request list for investigation.



var
  p: TAdvPDFLib;
  pg: TAdvGraphicsPDFEngine;
  pth: TAdvGraphicsPath;
  r: TRectF;
  st, swp: Single;
  cp, rd, sp, ird: TPointF;
begin
  p := TAdvPDFLib.Create;
  pg := TAdvGraphicsPDFEngine.Create(p);
  pth := TAdvGraphicsPath.Create;
  try
    p.BeginDocument('test.pdf');
    p.NewPage;


    pg.Fill.Color := gcRed;
    pg.Fill.Kind := gfkGradient;
    pg.Fill.ColorTo := gcOrange;
    pg.Stroke.Kind := gskSolid;
    pg.Stroke.Color := gcDarkred;


    r := RectF(200, 200, 500, 500);


    st := 90;
    swp := 180;


    rd := PointF((r.Right - r.Left) / 2, (r.Bottom - r.Top) / 2);
    ird := PointF((r.Right - r.Left) / 4, (r.Bottom - r.Top) / 4);
    cp := CenterPointEx(r);
    sp.X := cp.X + ird.X * Cos(DegToRad(st));
    sp.Y := cp.Y + ird.Y * Sin(DegToRad(st));


    pth.Clear;
    pth.MoveTo(sp);
    pth.AddArc(cp, rd, st, swp);
    pth.AddArc(cp, ird, st + swp, -swp);
    pth.ClosePath;


    pg.DrawPath(pth);


    p.EndDocument(True);
  finally
    pth.Free;
    pg.Free;
    p.Free;
  end;