---
id: post/yzhums-com/63595
type: post
title: "Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs)"
summary: "Converting Word documents to PDF format within Business Central can be achieved using the built-in ConvertWordToPdf procedure from codeunit 9651 without requiring control add-ins or external APIs. The post demonstrates two practical approaches: converting attached Word documents and uploading documents for conversion, with complete source code examples."
tier: community
language: en
tags:
  - word documents
  - pdf conversion
  - document attachment
  - codeunit
  - temp blob
  - file management
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:42:40.324Z"
  flags: []
generated:
  at: "2026-10-26T08:08:59.782Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 40ca5fc8f11a16cedf52f015eb39f995e5991a38bf87f8ff57f4ac20b941c539
evidence:
  - kind: blog
    url: https://yzhums.com/63595/
    title: "Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs)"
    date: "2025-05-08"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/63595/
    title: "Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs)"
    date: "2025-05-08"
    commit: null
    t: null
    quote: 'codeunit 9651 "Document Report Mgt." -> procedure ConvertWordToPdf(var TempBlob: Codeunit "Temp Blob"; ReportID: Integer)'
links:
  learn: []
  objects:
    - object/codeunit/9651
    - object/codeunit/4100
    - object/codeunit/419
    - object/page/1173
    - object/page/22
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: post/gerardorenteria-blog/12961
      title: 🕐 Remember When Lists Could Sort By Any Key? 🔄
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: video/KmuTVkodRXM
      title: All new goodies about AL Namespace in BC 2025 wave 2
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/ai/ai-development-toolkit-attachments
      title: Attachment capabilities and limitations (preview)
      label: possibly related
      why: names Codeunit 4100 "Temp Blob"
      by: code
    - to: video/H7R_m8Ue38g
      title: "Business Central v29: System Audit Fields Now Available in Analysis Mode"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/64042
      title: "Dynamics 365 Business Central: Convert Word (.docx) To HTML (.html) within BC (No control add-in and APIs)"
      label: possibly related
      why: both name Codeunit 9651 "Document Report Mgt."
      by: code
    - to: post/yzhums-com/65522
      title: "Dynamics 365 Business Central: Generate Swiss QR Code without external services/APIs"
      label: possibly related
      why: both name Codeunit 4100 "Temp Blob"
      by: code
    - to: post/yzhums-com/68731
      title: "Dynamics 365 Business Central: How to get current Profile (Role) info (Profile ID, Display Name, Source, Role Center ID, etc.) via AL"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/68624
      title: "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)"
      label: possibly related
      why: both name Page 1173 "Document Attachment Details"
      by: code
    - to: post/yzhums-com/56521
      title: "Dynamics 365 Business Central: How to hide/disable New, Edit (Edit List), and Delete actions on the page"
      label: possibly related
      why: both name Page 22 "Customer List"
      by: code
    - to: post/yzhums-com/63942
      title: "Dynamics 365 Business Central: How to preview Word (.docx) in web client without downloading (No control add-in and APIs)"
      label: possibly related
      why: both name Codeunit 9651 "Document Report Mgt."
      by: code
post_id: "63595"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/63595/
published_at: "2025-05-08T00:59:31.000Z"
author: Yun Zhu
full_text: false
words: 491
quotes:
  - text: 'codeunit 9651 "Document Report Mgt." -> procedure ConvertWordToPdf(var TempBlob: Codeunit "Temp Blob"; ReportID: Integer)'
    why_it_matters: Identifies the exact system procedure developers should use for Word-to-PDF conversion without external tools
code_objects_mentioned:
  - codeunit Document Report Mgt.
  - codeunit Temp Blob
  - codeunit File Management
  - page Document Attachment Details
  - page Customer List
systems:
  - development
  - reporting
versions_mentioned: []
cautions:
  - kind: warning
    quote: The document contains elements that cannot be converted to PDF. This may be caused by missing image data in the document.
    objects: []
    events: []
    versions: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2025/05/Snipaste_2025-05-08_09-52-34.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:20:53.726Z"
---

# Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs)

[Read the post](https://yzhums.com/63595/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2025-05-08 · 491 words · tier community · reviewed (checked by Opus)

> Converting Word documents to PDF format within Business Central can be achieved using the built-in ConvertWordToPdf procedure from codeunit 9651 without requiring control add-ins or external APIs. The post demonstrates two practical approaches: converting attached Word documents and uploading documents for conversion, with complete source code examples.

## Key points

- Use codeunit 9651 Document Report Mgt. and its ConvertWordToPdf procedure to convert DOCX files to PDF
- No control add-ins or external APIs required for the conversion functionality
- Can integrate conversion into page extensions to add Word-to-PDF conversion actions
- The method handles document attachments through temp blob objects for streaming

## Quotes

- "codeunit 9651 "Document Report Mgt." -> procedure ConvertWordToPdf(var TempBlob: Codeunit "Temp Blob"; ReportID: Integer)" (Identifies the exact system procedure developers should use for Word-to-PDF conversion without external tools)

## 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 9651 "Document Report Mgt."](../../objects/codeunit/9651.md)
- [codeunit 4100 "Temp Blob"](../../objects/codeunit/4100.md)
- [codeunit 419 "File Management"](../../objects/codeunit/419.md)
- [page 1173 "Document Attachment Details"](../../objects/page/1173.md)
- [page 22 "Customer List"](../../objects/page/22.md)

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [🕐 Remember When Lists Could Sort By Any Key? 🔄](../../posts/gerardorenteria-blog/12961.md) — possibly related: both name Page 22 "Customer List"
- [All new goodies about AL Namespace in BC 2025 wave 2](../../videos/KmuTVkodRXM.md) — possibly related: both name Page 22 "Customer List"
- [Attachment capabilities and limitations (preview)](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/ai/ai-development-toolkit-attachments) — possibly related: names Codeunit 4100 "Temp Blob"
- [Business Central v29: System Audit Fields Now Available in Analysis Mode](../../videos/H7R_m8Ue38g.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics 365 Business Central: Convert Word (.docx) To HTML (.html) within BC (No control add-in and APIs)](../../posts/yzhums-com/64042.md) — possibly related: both name Codeunit 9651 "Document Report Mgt."
- [Dynamics 365 Business Central: Generate Swiss QR Code without external services/APIs](../../posts/yzhums-com/65522.md) — possibly related: both name Codeunit 4100 "Temp Blob"
- [Dynamics 365 Business Central: How to get current Profile (Role) info (Profile ID, Display Name, Source, Role Center ID, etc.) via AL](../../posts/yzhums-com/68731.md) — possibly related: both name Page 22 "Customer List"
- [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)](../../posts/yzhums-com/68624.md) — possibly related: both name Page 1173 "Document Attachment Details"
- [Dynamics 365 Business Central: How to hide/disable New, Edit (Edit List), and Delete actions on the page](../../posts/yzhums-com/56521.md) — possibly related: both name Page 22 "Customer List"
- [Dynamics 365 Business Central: How to preview Word (.docx) in web client without downloading (No control add-in and APIs)](../../posts/yzhums-com/63942.md) — possibly related: both name Codeunit 9651 "Document Report Mgt."

## Heads up

- warning: "The document contains elements that cannot be converted to PDF. This may be caused by missing image data in the document."

## Context

- Features: Convert Word to PDF, Document attachments, Word layouts, File conversion, Stream handling

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
