BlogAll Blog Posts | Next Post | Previous Post
Monday, December 20, 2021
The architecture needed to be solid, robust as well as extensible. Our initial idea was to create a base component for each product separately, but not long after, we abandoned the idea and immediately thought out of the box and created TMS FNC Core. TMS FNC Core was the foundation we created starting with a custom control class and some utility functions. Over the years TMS FNC Core grew into a versatile base foundation for creating cross-platform and cross-framework custom controls. This includes VCL, FMX, LCL and WEB frameworks. Today we focus on a showcasing TMS FNC Core for VCL.
Working on FNC components and the TMS FNC Core foundation on a daily basis and looking back at beginning made us realize that TMS FNC Core is much more than just a foundation. It's actually capable of doing powerful things with little to no code. The following example demonstrates what TMS FNC Core alone is capable of. No need to install additional components, just download, install TMS FNC Core, plugin the code and experience the true power of FNC.
Out of all the features TMS FNC Core has to offer, we picked a couple of important ones: PDF export, SVG and asynchronous file download support. The code snippet below shows how to download an SVG, export it to PDF. Not more than 25 lines of code went into this sample, with a very nice and warm result, especially during this time of the year!
uses VCL.TMSFNCCloudBase, VCL.TMSFNCTypes, VCL.TMSFNCPDFLib, VCL.TMSFNCGraphicsTypes; procedure TChristmasForm.GenerateChristmasWishes; begin TTMSFNCCloudBase.DownloadFileFromURL('https://tmssoftware.com/site/img/merry%20christmas.svg', procedure(const ARequestResult: TTMSFNCCloudBaseRequestResult) var b: TTMSFNCBitmap; p: TTMSFNCPDFLib; begin p := TTMSFNCPDFLib.Create; b := TTMSFNCBitmap.CreateFromStream(ARequestResult.ResultStream); try p.HeaderSize := 100; p.HeaderFont.Size := 24; p.HeaderFont.Style := [TFontStyle.fsBold]; p.HeaderFont.Name := 'Lucida Handwriting'; p.HeaderFont.Color := MakeGraphicsColor(156, 41, 41); p.Header := 'tmssoftware.com wishes you a'; p.Footer := ''; p.BeginDocument('Christmas.pdf'); p.NewPage; p.Graphics.DrawImage(b, p.MediaBox); p.EndDocument(True); finally b.Free; p.Free; end; end); end;
Download TMS FNC Core today, explore the capabilities!. Found something yourself that's worth sharing? Please let us know, we are excited to find out what you have created, in which way you are using FNC. TMS and FNC wishes you all the best and a merry Christmas!
This blog post has not received any comments yet.
All Blog Posts | Next Post | Previous Post