From 5f4e2f65402b9aa611f93b2fa14ea69bf7b26d2d Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 18 May 2019 08:08:21 -0400 Subject: Generalize awk script that produces doc.go --- contrib/gofpdi/gofpdi.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'contrib') diff --git a/contrib/gofpdi/gofpdi.go b/contrib/gofpdi/gofpdi.go index d1b98e9..b951ea3 100644 --- a/contrib/gofpdi/gofpdi.go +++ b/contrib/gofpdi/gofpdi.go @@ -17,8 +17,9 @@ type gofpdiPdf interface { SetError(err error) } -// Imports a page of a PDF file with the specified box (/MediaBox, /TrimBox, /ArtBox, /CropBox, or /BleedBox). -// Returns a template id that can be used with UseImportedTemplate to draw the template onto the page. +// ImportPage imports a page of a PDF file with the specified box (/MediaBox, +// /TrimBox, /ArtBox, /CropBox, or /BleedBox). Returns a template id that can +// be used with UseImportedTemplate to draw the template onto the page. func ImportPage(f gofpdiPdf, sourceFile string, pageno int, box string) int { // Set source file for fpdi fpdi.SetSourceFile(sourceFile) @@ -51,9 +52,9 @@ func ImportPage(f gofpdiPdf, sourceFile string, pageno int, box string) int { return tpl } -// Draw the template onto the page at x,y -// If w is 0, the template will be scaled to fit based on h -// If h is 0, the template will be scaled to fit based on w +// UseImportedTemplate draws the template onto the page at x,y. If w is 0, the +// template will be scaled to fit based on h. If h is 0, the template will be +// scaled to fit based on w. func UseImportedTemplate(f gofpdiPdf, tplid int, x float64, y float64, w float64, h float64) { // Get values from fpdi tplName, scaleX, scaleY, tX, tY := fpdi.UseTemplate(tplid, x, y, w, h) -- cgit v1.2.1-24-ge1ad