You are not logged in.
Pages: 1
Hello,
I'm using this PDF-Engine and it works great.
Only by filling a rectangle with a brushstyle, I found a problem.
I have tried to fill a rectangle with a green structure or better, a brush style, for example bsDiaCross.
At first I only create a PDF-file, but all I could see was a completely filled green rectangle.
After this I have saved the Metafile in "a.wmf" file to control the structure. And I saw the correct result.
here the code to generate both files:
procedure TForm28.Button1Click(Sender: TObject);
var Meta: TMetafile;
doc : TPDFDocument;
Page: TPdfPage;
R: TRect;
begin
Meta := TMetafile.Create;
meta.SetSize(500,500);
Canvas := TMetafileCanvas.Create(Meta, GetDC(0));
R := ClientRect;
InflateRect(R, -10, -10);
Canvas.Brush.Color := clgreen;
Canvas.Brush.Style := bsDiagCross;
Canvas.Pen.Color := clRed;
Canvas.Rectangle(R);
Canvas.Free;
//in this file, the result is the prefered one, the brushstyles are shown and it's what I need.
meta.SaveToFile('c:\Temp\a.wmf');
Doc := TPdfDocument.Create;
Doc.DefaultPaperSize := psA4;
Page := Doc.AddPage;
Page.PageLandscape := true;
Doc.canvas.RenderMetaFile(meta);
//but if i save the same Metafile in a PDF-Document,
//the rectangle with the brushstyle is completely filled with the brush.color.
//and no style is visible
Doc.SaveToFile('c:\Temp\a.pdf');
end;
I hope someone can help me to print structures in the PDF-file.
Thanks in advance.
Hi everyone,
I used this PDF engine too and I'm glad about functions that are implemented.
But I'm searching for an function/procedure to draw arcs in the PDF, but I only found CurveTo*().
Is this the correct method to draw the required things?
Requirement:
- at least 2 specific points (up to 3 points) are known
- I need a normal round arc without any specific behaviour of the curve
( like 1/4 of a circle, e.g.: http://www.schornsteinmarkt.de/images/p … 2016_0.jpg )
I thought about something like, point A (start of the arc) and point B (end of the arc) and maybe a controlpoint C (on the curve/arc) are given and the curve/arc will be drawn through the points.
Maybe someone can help me with a hint or tip to do this.
Thanks in advance.
Pages: 1