Search code examples
delphipdftmstms-web-core

How to display a PDF document in Delphi using TMS WEB Core?


I have a basic TMS WEB Core page with a panel and I want to display a PDF file within that panel.

I looked for PDF-related TMS components that can help me to show a PDF on a TMS WEB Core page, but couldn't really find anything super useful.

How can I display my PDF file on that panel?


Solution

  • Turns out that showing PDFs in TMS WEB Core is actually super simple.

    You can just drop a TWebBrowserControl component onto the form and set the URL property to the location of your PDF.

    You can also do it via code:

    WebBrowserControl.URL := 'Link_To_Your_PDF_File.pdf';
    

    That will then show a PDF when running the website.