Skip to main content
Solved

Is it possible to apply a word wrap to text going into a PDF writer?

  • August 13, 2021
  • 2 replies
  • 201 views

bozboswell
Contributor
Forum|alt.badge.img+7

I am creating PDF documents with a series of responses, so I first create a multi-line attribute then I pass that through the PDFPageFormatter and onto a PDF writer. The problem is some of the responses run off the page. I am needing to restrict the width of the multi-line attribute using something like a word-wrap function.

 

Any ideas?

Best answer by drc43

I highly recommend the Custom Transformer - TextWrapper. I had a similar problem and this solved it beautifully.

https://hub.safe.com/publishers/david-r/transformers/textwrapper

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

drc43
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 83 replies
  • Best Answer
  • August 13, 2021

I highly recommend the Custom Transformer - TextWrapper. I had a similar problem and this solved it beautifully.

https://hub.safe.com/publishers/david-r/transformers/textwrapper


bozboswell
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 8 replies
  • August 20, 2021

Thank you @drc43​ , that worked well.