summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2019-05-18 08:08:21 -0400
committerKurt <kurt.w.jung@gmail.com>2019-05-18 08:08:21 -0400
commit5f4e2f65402b9aa611f93b2fa14ea69bf7b26d2d (patch)
tree0866c2a0b794887b4aee16aa2be2a279917fe14e /contrib
parente4895cb2e4a6b49e241d7668740c1a557ef4b8c5 (diff)
Generalize awk script that produces doc.go
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gofpdi/gofpdi.go11
1 files changed, 6 insertions, 5 deletions
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)