-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
OutputStream out = new ByteArrayOutputStream()
def testText = "I don’t have very much experience with hardware or hacking (aside from high school robotics), but I am most willing to try.\r"
def builder = new PdfDocumentBuilder(out)
builder.create {
document(font: [family: 'Helvetica', size: 12.pt], margin: [top: 0.75.inches]) {
paragraph {
font.size = 18.pt
text "${testText}", font: [bold: true]
}
}
return out.toByteArray()
Using the above code, the output is:
"þÿ I d o n t h a v e v e r y m u c h e x p e r i e n c e w i t h hacking (aside from high school robotics), but I am
most willing to try".
Any user supplied 's seem to turn into empty character and mangled lines/fonts.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels