Hello All,
For fcl-pdf, is there a way to output the PDF to a browser?
Currently I only see a way to save to file, via Document.SaveToFile('output.pdf');
See sample below.
begin
Document := TPDFDocument.Create(nil);
Document.FontDirectory := 'C:\Windows\Fonts';
Document.Options := Document.Options + [poPageOriginAtTop, poNoEmbeddedFonts];
Document.StartDocument;
FontID := Document.AddFont('arial.ttf', 'Arial');
FontBoldID := Document.AddFont('arialbd.ttf', 'Arial Bold');
Section := Document.Sections.AddSection;
Page := Document.Pages.AddPage;
Section.AddPage(Page);
Page.SetFont(FontID, 11);
Page.WriteText(20, 20, 'This is normal text');
Page.SetFont(FontBoldID, 11);
Page.WriteText(20, 30, 'This is bold text');
Document.SaveToFile('output.pdf');
end;