Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to initialize parser: Failed to read pdf: Failed to read xref table: Expected xref to start with 'xref'. Got: 40 #39

Open
batnyam opened this issue Dec 17, 2020 · 0 comments

Comments

@batnyam
Copy link

batnyam commented Dec 17, 2020

How can i import pdf template.

My code
`pdf := gofpdf.New("P", "mm", "A4", "")
tpl1 := gofpdi.ImportPage(pdf, "contract-1.pdf", 1, "")
gofpdi.UseImportedTemplate(pdf, tpl1, 20, 50, 150, 0)

var buf bytes.Buffer
err := pdf.Output(&buf)
pdf.Close()

return err, buf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant