# Bug OP-18504 - PDF export of work packages does not resolve macros of custom fields successfully

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-18504

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Export / PDF Export, Modules and project features / Text editor |
| Target versions | 17.0.0 |
| Observed in versions |  |
| Sprint | 17.0.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Oliver Günther |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

<br>

### Steps to reproduce

  - In a work package description add two(\!) macros for custom fields in one text line, just like `workPackageValue:"dueDate" workPackageValue:"startDate"`

  - Assign that custom field a value

  - Enable on the work package type the PDF export template "Contract"

  - Export the work package as PDF (or simply genereate a PDF based on this bug with the contract template, having the following line

   

### What is the buggy behavior?

  - While the value render correctly in the preview of the work package

  - It breaks in the PDF. Macro markup is shown and the value

### What is the expected behavior?

Just the custom field value gets rendered into the PDF

<br>

Observed here on community.
