Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
gofpdi
✓ github.com/phpdave11/gofpdi
Import a page from an existing PDF and use it as a template.
package main
import (
"github.com/phpdave11/gofpdi"
"github.com/go-pdf/fpdf"
)
func main() {
pdf := fpdf.New("P", "mm", "A4", "")
pdf.AddPage()
// Import an existing PDF page as a template
tpl := gofpdi.ImportPage(pdf, "source.pdf", 1, "/MediaBox")
gofpdi.UseImportedTemplate(pdf, tpl, 0, 0, 210, 0)
pdf.OutputFileAndClose("output.pdf")
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.0.16latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.