Shrink to fit for wrapped text

Refer to the following example code to see how to shrink to fit the wrapped text when exporting to PDF.