Update to prepare PR

This commit is contained in:
Gunnsteinn Hall 2018-10-15 10:58:19 +00:00
parent 0d331d036f
commit c87723b411
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE.md', which is part of this source code package.
*/
package strutils
import (

View File

@ -126,15 +126,15 @@ func (pdf *PdfReader) FlattenFields(allannots bool, appgen FieldAppearanceGenera
name := page.Resources.GenerateXObjectName()
page.Resources.SetXObjectFormByName(name, xform)
// XXX/TODO: Take Matrix and potential scaling of annotation Rect and appearance BBox into account.
// Have yet to find a case where that actually is required.
// TODO(gunnsth): Take Matrix and potential scaling of annotation Rect and appearance
// BBox into account. Have yet to find a case where that actually is required.
// Placement for XForm.
xRect := math.Min(rect.Llx, rect.Urx)
yRect := math.Min(rect.Lly, rect.Ury) // Needed for rect in: govdocs 019693.pdf.
// Generate the content stream to display the XForm.
// XXX/TODO: Creating the contentstream directly here as cannot import contentstream package into
// TODO(gunnsth): Creating the contentstream directly here as cannot import contentstream package into
// model (as contentstream depends on model). Consider if we can change the dependency pattern.
ops := []string{}
ops = append(ops, "q")