# Converting word documents to PDF

**URL:** <https://community.appfarm.io/t/converting-word-documents-to-pdf/1917>\
**Category:** Ask the community\
**Tags:** pdf, run-code\
**Created:** [June 25, 2025, 12:39pm UTC](https://community.appfarm.io/t/converting-word-documents-to-pdf/1917 "2025-06-25T12:39:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxim.christensen](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@maxim.christensen](https://community.appfarm.io/u/maxim.christensen)\
**Post date:** [June 25, 2025, 12:39pm UTC](https://community.appfarm.io/t/converting-word-documents-to-pdf/1917/1 "2025-06-25T12:39:17Z")

</div>

I’m currently working on a code action with the following objectives:

1. Populate predefined fields in a Word document using variables from various sources
2. Convert the resulting Word document to a PDF

The main challenge arises during the conversion process: I’m having difficulty preserving the original formatting and layout when converting the Word document to PDF.

So far, I haven’t found any client-side libraries that provide a straightforward way to dynamically convert a Word file to PDF while maintaining the formatting. Additionally, I haven’t identified a solution within Appfarm that supports performing this conversion at scale, as the goal is to extend the functionality to handle bulk conversion of Word files to PDF.

Is there a recommended approach or solution for achieving this within the Appfarm platform?
