Currently I'm creating a pdf document this way:
try
PDFLib:= TTMSFNCPDFLib.Create();
PDFLib.BeginDocument('MyPDF.pdf');
PDFLib.Header:= 'My header';
PDFLib.Footer:= '';
PDFLib.NewPage();
PDFLib.Graphics.Font.Name := 'Arial';
PDFLib.Graphics.Font.Size := 10;
PDFLib.Graphics.Fill.Color := gcNull;
point.X:= 20;
point.Y:= 60;
rect:= PDFLib.Graphics.DrawText('Project :', point);
point.X:= rect.Right + 5;
rect:= PDFLib.Graphics.DrawText('My project');
PDFLib.EndDocument(true);
finally
PDFLib.Free();
end;
After creation the pdf document is opened with name 'tmp.pdf' inside the browser, but is not stored locally inside the application directory. Are there any restriction for saving the pdf files locally?
Furthermore, the method TTMSFNCPDFLib.EndDocument() returns a MemoryStream. When I try:
PDFLib.EndDocument(true).SaveToFile('MyPDF.pdf');
There is an error message:
With an other demo project, which was working with TTMSFNCGraphicsPDFIO the local storage of the pdf file by TMemoryStream was no problem.