Skip to content

apostrophe in string turn into mangled text #29

@jmlittle

Description

@jmlittle
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions