Skip to content

Inserted text is vertically flipped #43

@myvodx

Description

@myvodx

I followed the sample to insert text to a PDF file

var pt pdft.PDFt
err := pt.Open(pdfsource)
if err != nil {
	panic("Couldn't open pdf.")
}


err = pt.AddFont("arial", "./arial.ttf")
if err != nil {
    t.Error(err)
    return
}

err = pt.SetFont("arial", "", 14)
if err != nil {
    panic(err) 
}

//insert text to pdf
err = pt.Insert("Hello", 1, 10, 10, 100, 100, gopdf.Center|gopdf.Bottom, &pdft.FontColor{R: 255, G: 119, B: 51})
if err != nil {
    panic(err) 
}

However the output of inserted text is vertically flipped (orange)
image

Does anyone know how to correct it?
Thank you!

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