Feature Request for New PDF Library

Hi Bruno,


I would have use the "Feature Request" section of the website but it doesn't seem to have a section for AdvPDF Library yet.

I'd like to create high resolution maps in my application. I was going to use Gnostice's PDF creation tool but (of course) I'd prefer to use TMS's.

To export high resolution maps here's what I'd need it to do:
  1. User definable DPI for the PDF
  2. Create polygons and polygons with holes (the TCanvas API for polygons with holes is PolyPolygons)
  3. Text with a stroke outline of a chosen color.
I hope this is possible!

Thanks,

Steve

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;