Dynamics 365 Business Central: previewing PDF files in web client using the new ExtendedDataType = Document.
Dynamics 365 Business Central 2025 Wave 2 introduces a new ExtendedDataType called Document that enables PDF file previews in web client FactBoxes. Developers can use Media fields with this data type to display PDF files as images in CardPart and ListPart pages by converting them using the PDF Document codeunit.

post Stefano Demiliani
"This new ExtendedDataType allows the client to render elements such as PDF files and images in FactBoxes."
Key points
- New Document ExtendedDataType available in v27 with AL Language 16.x for Media and MediaSet fields
- Allows rendering PDF files and images in FactBox elements (CardPart and ListPart pages)
- PDF files must be converted to images using the ConvertToImage method before preview
- Implementation requires loading PDF content into InStream, converting to image format, and importing into Media field
Quotes
- “This new ExtendedDataType allows the client to render elements such as PDF files and images in FactBoxes.” (Explains the primary capability and use case for the new Document ExtendedDataType feature)
- “Convert the PDF document in an image by calling the ConvertToImage method.” (Identifies the key technical step required to prepare PDFs for preview in the UI)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
- codeunit 419 “File Management”
- codeunit 4100 “Temp Blob”
- codeunit 3110 “PDF Document”
- page “SD PDF Preview”
Not found in BC28-30: page “SD PDF Preview”.
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Attachment capabilities and limitations (preview) — possibly related: names Codeunit 4100 “Temp Blob”
- Business Central 2025 wave 2 (BC27): Support for new ExtendedDataType value: Document (display/preview a PDF as a portrait image in FactBox) — possibly related: both name Codeunit 3110 “PDF Document”
- Dynamics 365 Business Central: Convert Word (.docx) To HTML (.html) within BC (No control add-in and APIs) — possibly related: both name Codeunit 419 “File Management”
- Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs) — possibly related: both name Codeunit 419 “File Management”
- Dynamics 365 Business Central: Generate Swiss QR Code without external services/APIs — possibly related: both name Codeunit 4100 “Temp Blob”
- Dynamics 365 Business Central: How to copy values (Blob) from one Codeunit “Temp Blob” to another Codeunit “Temp Blob” — possibly related: both name Codeunit 4100 “Temp Blob”
- Dynamics 365 Business Central: How to get the page number of a PDF or Word file in AL (Display the page count on Attached Documents and Doc. Attachment List Factbox) — possibly related: both name Codeunit 419 “File Management”
- Dynamics 365 Business Central: How to preview Word (.docx) in web client without downloading (No control add-in and APIs) — possibly related: both name Codeunit 4100 “Temp Blob”
- Dynamics 365 Business Central: How to quickly strip not supported chars in File Name via AL — possibly related: both name Codeunit 419 “File Management”
- Step by Step Guide to Importing Excel Data into Business Central — possibly related: both name Codeunit 419 “File Management”
Heads up
- gotcha: “you need to always pass 1 to the ConvertToImage function as the page number to preview” (about codeunit PDF Document, version 27, version 2025 Wave 2)
Context
- Features: PDF preview in web client, ExtendedDataType Document, Media field rendering, PDF to image conversion, FactBox document display
- Versions: 2025 Wave 2, v27, AL Language 16.x
Source: Stefano Demiliani, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.