Browse Source

Get rid of /v3 everywhere

master v3.6.0
Maze X 11 months ago
parent
commit
90a1d6d39b
Signed by: maze GPG Key ID: ED7B1576294DF221
253 changed files with 571 additions and 571 deletions
  1. +4
    -4
      annotator/circle.go
  2. +5
    -5
      annotator/field_appearance.go
  3. +3
    -3
      annotator/form_field.go
  4. +4
    -4
      annotator/line.go
  5. +4
    -4
      annotator/rectangle.go
  6. +1
    -1
      common/license/crypto.go
  7. +1
    -1
      common/license/key.go
  8. +1
    -1
      common/license/util.go
  9. +1
    -1
      contentstream/contentstream.go
  10. +3
    -3
      contentstream/creator.go
  11. +1
    -1
      contentstream/draw/bezier_curve.go
  12. +1
    -1
      contentstream/draw/point.go
  13. +3
    -3
      contentstream/draw/shapes.go
  14. +1
    -1
      contentstream/draw/utils.go
  15. +2
    -2
      contentstream/encoding.go
  16. +3
    -3
      contentstream/inline-image.go
  17. +2
    -2
      contentstream/parser.go
  18. +1
    -1
      contentstream/parser_test.go
  19. +4
    -4
      contentstream/processor.go
  20. +3
    -3
      contentstream/utils.go
  21. +1
    -1
      core/crossrefs.go
  22. +3
    -3
      core/crypt.go
  23. +3
    -3
      core/crypt_file_test.go
  24. +2
    -2
      core/crypt_test.go
  25. +2
    -2
      core/encoding.go
  26. +8
    -8
      core/encoding_jbig2.go
  27. +1
    -1
      core/encoding_jbig2_test.go
  28. +1
    -1
      core/encoding_test.go
  29. +1
    -1
      core/io.go
  30. +2
    -2
      core/parser.go
  31. +1
    -1
      core/parser_test.go
  32. +2
    -2
      core/primitives.go
  33. +1
    -1
      core/repairs.go
  34. +1
    -1
      core/security/crypt/filter_aesv2.go
  35. +1
    -1
      core/security/crypt/filter_aesv3.go
  36. +1
    -1
      core/security/crypt/filter_v2.go
  37. +1
    -1
      core/security/crypt/filters.go
  38. +1
    -1
      core/security/standard_r4.go
  39. +1
    -1
      core/security/standard_r4_test.go
  40. +1
    -1
      core/stream.go
  41. +1
    -1
      core/stream_test.go
  42. +1
    -1
      core/utils.go
  43. +4
    -4
      creator/block.go
  44. +2
    -2
      creator/border.go
  45. +2
    -2
      creator/chapters.go
  46. +1
    -1
      creator/color.go
  47. +2
    -2
      creator/creator.go
  48. +5
    -5
      creator/creator_test.go
  49. +1
    -1
      creator/curve.go
  50. +1
    -1
      creator/division.go
  51. +1
    -1
      creator/division_test.go
  52. +2
    -2
      creator/ellipse.go
  53. +4
    -4
      creator/filled_curve.go
  54. +1
    -1
      creator/filled_curve_test.go
  55. +5
    -5
      creator/image.go
  56. +1
    -1
      creator/invoice_test.go
  57. +2
    -2
      creator/line.go
  58. +1
    -1
      creator/list_test.go
  59. +4
    -4
      creator/paragraph.go
  60. +2
    -2
      creator/rectangle.go
  61. +5
    -5
      creator/styled_paragraph.go
  62. +1
    -1
      creator/styled_paragraph_test.go
  63. +4
    -4
      creator/table.go
  64. +1
    -1
      creator/table_test.go
  65. +3
    -3
      creator/text_chunk.go
  66. +1
    -1
      creator/text_chunk_test.go
  67. +1
    -1
      creator/text_style.go
  68. +1
    -1
      creator/toc_line.go
  69. +1
    -1
      creator/toc_test.go
  70. +2
    -2
      creator/utils.go
  71. +1
    -1
      extractor/extractor.go
  72. +4
    -4
      extractor/image.go
  73. +2
    -2
      extractor/image_test.go
  74. +5
    -5
      extractor/text.go
  75. +4
    -4
      extractor/text_test.go
  76. +2
    -2
      extractor/utils.go
  77. +1
    -1
      fdf/fielddata.go
  78. +1
    -1
      fdf/io.go
  79. +2
    -2
      fdf/parser.go
  80. +1
    -1
      fdf/parser_test.go
  81. +2
    -2
      fjson/fielddata.go
  82. +1
    -1
      fjson/fielddata_test.go
  83. +1
    -1
      internal/cmap/bcmaps_test.go
  84. +3
    -3
      internal/cmap/cmap.go
  85. +1
    -1
      internal/cmap/cmap_parser.go
  86. +2
    -2
      internal/cmap/parser.go
  87. +1
    -1
      internal/cmap/utils.go
  88. +2
    -2
      internal/e2etest/allobjects_test.go
  89. +3
    -3
      internal/e2etest/extract_images_test.go
  90. +3
    -3
      internal/e2etest/fdfmerge_test.go
  91. +2
    -2
      internal/e2etest/passthrough_test.go
  92. +2
    -2
      internal/e2etest/split_test.go
  93. +1
    -1
      internal/e2etest/validate.go
  94. +1
    -1
      internal/jbig2/basic/nums.go
  95. +1
    -1
      internal/jbig2/bitmap/bin-expand.go
  96. +1
    -1
      internal/jbig2/bitmap/bin-expand_test.go
  97. +2
    -2
      internal/jbig2/bitmap/bin-reduce.go
  98. +4
    -4
      internal/jbig2/bitmap/bitmap.go
  99. +1
    -1
      internal/jbig2/bitmap/bitmap_test.go
  100. +2
    -2
      internal/jbig2/bitmap/boxes.go

+ 4
- 4
annotator/circle.go View File

@ -6,11 +6,11 @@
package annotator
import (
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/v3/contentstream/draw"
pdfcore "maze.io/x/unipdf/v3/core"
pdf "maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/contentstream/draw"
pdfcore "maze.io/x/unipdf/core"
pdf "maze.io/x/unipdf/model"
)
type CircleAnnotationDef struct {


+ 5
- 5
annotator/field_appearance.go View File

@ -11,11 +11,11 @@ import (
"strings"
"unicode"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/internal/textencoding"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/internal/textencoding"
"maze.io/x/unipdf/model"
)
// FieldAppearance implements interface model.FieldAppearanceGenerator and generates appearance streams


+ 3
- 3
annotator/form_field.go View File

@ -9,9 +9,9 @@ import (
"bytes"
"errors"
"maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// TextFieldOptions defines optional parameter for a text field in a form.


+ 4
- 4
annotator/line.go View File

@ -6,10 +6,10 @@
package annotator
import (
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream/draw"
pdfcore "maze.io/x/unipdf/v3/core"
pdf "maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream/draw"
pdfcore "maze.io/x/unipdf/core"
pdf "maze.io/x/unipdf/model"
)
// LineAnnotationDef defines a line between point 1 (X1,Y1) and point 2 (X2,Y2). The line ending styles can be none


+ 4
- 4
annotator/rectangle.go View File

@ -6,11 +6,11 @@
package annotator
import (
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/v3/contentstream/draw"
pdfcore "maze.io/x/unipdf/v3/core"
pdf "maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/contentstream/draw"
pdfcore "maze.io/x/unipdf/core"
pdf "maze.io/x/unipdf/model"
)
// RectangleAnnotationDef is a rectangle defined with a specified Width and Height and a lower left corner at (X,Y).


+ 1
- 1
common/license/crypto.go View File

@ -18,7 +18,7 @@ import (
"strings"
"time"
_ "maze.io/x/unipdf/v3/common"
_ "maze.io/x/unipdf/common"
)
const (


+ 1
- 1
common/license/key.go View File

@ -9,7 +9,7 @@ import (
"fmt"
"time"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
const (


+ 1
- 1
common/license/util.go View File

@ -12,7 +12,7 @@ import (
"os"
"strings"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// Defaults to unlicensed.


+ 1
- 1
contentstream/contentstream.go View File

@ -9,7 +9,7 @@ import (
"bytes"
"fmt"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/core"
)
// ContentStreamOperation represents an operation in PDF contentstream which consists of


+ 3
- 3
contentstream/creator.go View File

@ -8,9 +8,9 @@ package contentstream
import (
"math"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// ContentCreator is a builder for PDF content streams.


+ 1
- 1
contentstream/draw/bezier_curve.go View File

@ -8,7 +8,7 @@ package draw
import (
"math"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
// CubicBezierCurve is defined by:


+ 1
- 1
contentstream/draw/point.go View File

@ -8,7 +8,7 @@ package draw
import (
"fmt"
"maze.io/x/unipdf/v3/internal/transform"
"maze.io/x/unipdf/internal/transform"
)
// Point represents a two-dimensional point.


+ 3
- 3
contentstream/draw/shapes.go View File

@ -3,9 +3,9 @@ package draw
import (
"math"
pdfcontent "maze.io/x/unipdf/v3/contentstream"
pdfcore "maze.io/x/unipdf/v3/core"
pdf "maze.io/x/unipdf/v3/model"
pdfcontent "maze.io/x/unipdf/contentstream"
pdfcore "maze.io/x/unipdf/core"
pdf "maze.io/x/unipdf/model"
)
// Circle represents a circle shape with fill and border properties that can be drawn to a PDF content stream.


+ 1
- 1
contentstream/draw/utils.go View File

@ -1,7 +1,7 @@
package draw
import (
pdfcontent "maze.io/x/unipdf/v3/contentstream"
pdfcontent "maze.io/x/unipdf/contentstream"
)
// DrawPathWithCreator makes the path with the content creator.


+ 2
- 2
contentstream/encoding.go View File

@ -12,8 +12,8 @@ import (
gocolor "image/color"
"image/jpeg"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
)
// Creates the encoder for the inline image's Filter and DecodeParms.


+ 3
- 3
contentstream/inline-image.go View File

@ -11,9 +11,9 @@ import (
"fmt"
"io"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// ContentStreamInlineImage is a representation of an inline image in a Content stream. Everything between the BI and EI operands.


+ 2
- 2
contentstream/parser.go View File

@ -14,8 +14,8 @@ import (
"io"
"strconv"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
)
// ContentStreamParser represents a content stream parser for parsing content streams in PDFs.


+ 1
- 1
contentstream/parser_test.go View File

@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/core"
)
type dictKeyVal struct {


+ 4
- 4
contentstream/processor.go View File

@ -9,10 +9,10 @@ import (
"errors"
"fmt"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/internal/transform"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/internal/transform"
"maze.io/x/unipdf/model"
)
// GraphicsState is a basic graphics state implementation for PDF processing.


+ 3
- 3
contentstream/utils.go View File

@ -8,9 +8,9 @@ package contentstream
import (
"errors"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
func makeParamsFromFloats(vals []float64) []core.PdfObject {


+ 1
- 1
core/crossrefs.go View File

@ -12,7 +12,7 @@ import (
"os"
"strings"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// xrefType indicates the type of a cross-references entry which can be either regular table entry or xref object


+ 3
- 3
core/crypt.go View File

@ -12,9 +12,9 @@ import (
"fmt"
"time"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core/security"
crypto "maze.io/x/unipdf/v3/core/security/crypt"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core/security"
crypto "maze.io/x/unipdf/core/security/crypt"
)
// EncryptInfo contains an information generated by the document encrypter.


+ 3
- 3
core/crypt_file_test.go View File

@ -12,9 +12,9 @@ import (
"path/filepath"
"testing"
pdfcontent "maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/core"
pdf "maze.io/x/unipdf/v3/model"
pdfcontent "maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/core"
pdf "maze.io/x/unipdf/model"
)
const aes3Dir = `./testdata`


+ 2
- 2
core/crypt_test.go View File

@ -10,8 +10,8 @@ package core
import (
"testing"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core/security"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core/security"
)
func init() {


+ 2
- 2
core/encoding.go View File

@ -33,9 +33,9 @@ import (
lzw1 "golang.org/x/image/tiff/lzw"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/v3/internal/ccittfax"
"maze.io/x/unipdf/internal/ccittfax"
)
// Stream encoding filter names.


+ 8
- 8
core/encoding_jbig2.go View File

@ -9,14 +9,14 @@ import (
"image"
"image/color"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/internal/imageutil"
"maze.io/x/unipdf/v3/internal/jbig2"
"maze.io/x/unipdf/v3/internal/jbig2/bitmap"
"maze.io/x/unipdf/v3/internal/jbig2/decoder"
"maze.io/x/unipdf/v3/internal/jbig2/document"
"maze.io/x/unipdf/v3/internal/jbig2/errors"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/internal/imageutil"
"maze.io/x/unipdf/internal/jbig2"
"maze.io/x/unipdf/internal/jbig2/bitmap"
"maze.io/x/unipdf/internal/jbig2/decoder"
"maze.io/x/unipdf/internal/jbig2/document"
"maze.io/x/unipdf/internal/jbig2/errors"
)
// JBIG2CompressionType defines the enum compression type used by the JBIG2Encoder.


+ 1
- 1
core/encoding_jbig2_test.go View File

@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/internal/jbig2/bitmap"
"maze.io/x/unipdf/internal/jbig2/bitmap"
)
// TestImageToJBIG2Image tests conversion of image.Image to JBIG2Image


+ 1
- 1
core/encoding_test.go View File

@ -9,7 +9,7 @@ import (
"encoding/base64"
"testing"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
func init() {


+ 1
- 1
core/io.go View File

@ -10,7 +10,7 @@ import (
"errors"
"io"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// Offset reader encapsulates io.ReadSeeker and offsets it by the specified


+ 2
- 2
core/parser.go View File

@ -18,8 +18,8 @@ import (
"strconv"
"strings"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core/security"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core/security"
)
// Regular Expressions for parsing and identifying object signatures.


+ 1
- 1
core/parser_test.go View File

@ -16,7 +16,7 @@ import (
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
func makeReaderForText(txt string) (*bytes.Reader, *bufio.Reader, int64) {


+ 2
- 2
core/primitives.go View File

@ -13,8 +13,8 @@ import (
"strconv"
"strings"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/internal/strutils"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/internal/strutils"
)
// PdfObject is an interface which all primitive PDF objects must implement.


+ 1
- 1
core/repairs.go View File

@ -17,7 +17,7 @@ import (
"io"
"strconv"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
var repairReXrefTable = regexp.MustCompile(`[\r\n]\s*(xref)\s*[\r\n]`)


+ 1
- 1
core/security/crypt/filter_aesv2.go View File

@ -8,7 +8,7 @@ package crypt
import (
"fmt"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
func init() {


+ 1
- 1
core/security/crypt/filter_aesv3.go View File

@ -12,7 +12,7 @@ import (
"fmt"
"io"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
func init() {


+ 1
- 1
core/security/crypt/filter_v2.go View File

@ -10,7 +10,7 @@ import (
"crypto/rc4"
"fmt"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
func init() {


+ 1
- 1
core/security/crypt/filters.go View File

@ -8,7 +8,7 @@ package crypt
import (
"fmt"
"maze.io/x/unipdf/v3/core/security"
"maze.io/x/unipdf/core/security"
)
var (


+ 1
- 1
core/security/standard_r4.go View File

@ -13,7 +13,7 @@ import (
"encoding/binary"
"errors"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
var _ StdHandler = stdHandlerR4{}


+ 1
- 1
core/security/standard_r4_test.go View File

@ -6,7 +6,7 @@
package security
import (
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
"testing"
)


+ 1
- 1
core/stream.go View File

@ -8,7 +8,7 @@ package core
import (
"fmt"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// NewEncoderFromStream creates a StreamEncoder based on the stream's dictionary.


+ 1
- 1
core/stream_test.go View File

@ -11,7 +11,7 @@ import (
"fmt"
"testing"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
func init() {


+ 1
- 1
core/utils.go View File

@ -15,7 +15,7 @@ import (
"sort"
"strconv"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// Check slice range to make sure within bounds for accessing:


+ 4
- 4
creator/block.go View File

@ -11,10 +11,10 @@ import (
"strings"
"unicode"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// Block contains a portion of PDF Page contents. It has a width and a position and can


+ 2
- 2
creator/border.go View File

@ -1,8 +1,8 @@
package creator
import (
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/model"
)
// border represents cell border.


+ 2
- 2
creator/chapters.go View File

@ -10,8 +10,8 @@ import (
"fmt"
"strconv"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/model"
)
// Chapter is used to arrange multiple drawables (paragraphs, images, etc) into a single section.


+ 1
- 1
creator/color.go View File

@ -10,7 +10,7 @@ import (
"math"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// Color interface represents colors in the PDF creator.


+ 2
- 2
creator/creator.go View File

@ -12,8 +12,8 @@ import (
"os"
"strconv"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/model"
)
// Creator is a wrapper around functionality for creating PDF reports and/or adding new


+ 5
- 5
creator/creator_test.go View File

@ -30,11 +30,11 @@ import (
"github.com/boombuler/barcode/qr"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/v3/model/optimize"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
"maze.io/x/unipdf/model/optimize"
)
func init() {


+ 1
- 1
creator/curve.go View File

@ -9,7 +9,7 @@ import (
"fmt"
"strings"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
// newCurve returns new instance of Curve between points (x1,y1) and (x2, y2) with control point (cx,cy).


+ 1
- 1
creator/division.go View File

@ -8,7 +8,7 @@ package creator
import (
"errors"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// Division is a container component which can wrap across multiple pages (unlike Block).


+ 1
- 1
creator/division_test.go View File

@ -11,7 +11,7 @@ import (
"testing"
"time"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
var seed = rand.New(rand.NewSource(time.Now().UnixNano()))


+ 2
- 2
creator/ellipse.go View File

@ -6,8 +6,8 @@
package creator
import (
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/model"
)
// Ellipse defines an ellipse with a center at (xc,yc) and a specified width and height. The ellipse can have a colored


+ 4
- 4
creator/filled_curve.go View File

@ -6,10 +6,10 @@
package creator
import (
pdfcontent "maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/contentstream/draw"
pdfcore "maze.io/x/unipdf/v3/core"
pdf "maze.io/x/unipdf/v3/model"
pdfcontent "maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/contentstream/draw"
pdfcore "maze.io/x/unipdf/core"
pdf "maze.io/x/unipdf/model"
)
// FilledCurve represents a closed path of Bezier curves with a border and fill.


+ 1
- 1
creator/filled_curve_test.go View File

@ -8,7 +8,7 @@ package creator
import (
"testing"
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/contentstream/draw"
)
func CreateFillCurve(x0, y0, x1, y1, x2, y2, x3, y3 float64) draw.CubicBezierCurve {


+ 5
- 5
creator/image.go View File

@ -11,11 +11,11 @@ import (
goimage "image"
"os"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// The Image type is used to draw an image onto PDF.


+ 1
- 1
creator/invoice_test.go View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
func TestInvoiceSimple(t *testing.T) {


+ 2
- 2
creator/line.go View File

@ -8,8 +8,8 @@ package creator
import (
"math"
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/model"
)
// Line defines a line between point 1 (X1,Y1) and point 2 (X2,Y2). The line ending styles can be none (regular line),


+ 1
- 1
creator/list_test.go View File

@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
func TestListSimple(t *testing.T) {


+ 4
- 4
creator/paragraph.go View File

@ -9,10 +9,10 @@ import (
"errors"
"strconv"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// Paragraph represents text drawn with a specified font and can wrap across lines and pages.


+ 2
- 2
creator/rectangle.go View File

@ -6,8 +6,8 @@
package creator
import (
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/model"
)
// Rectangle defines a rectangle with upper left corner at (x,y) and a specified width and height. The rectangle


+ 5
- 5
creator/styled_paragraph.go View File

@ -11,11 +11,11 @@ import (
"strings"
"unicode"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// StyledParagraph represents text drawn with a specified font and can wrap across lines and pages.


+ 1
- 1
creator/styled_paragraph_test.go View File

@ -9,7 +9,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
func TestParagraphRegularVsStyled(t *testing.T) {


+ 4
- 4
creator/table.go View File

@ -10,10 +10,10 @@ import (
"math"
"sort"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// Table allows organizing content in an rows X columns matrix, which can spawn across multiple pages.


+ 1
- 1
creator/table_test.go View File

@ -10,7 +10,7 @@ import (
"io/ioutil"
"testing"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
var (


+ 3
- 3
creator/text_chunk.go View File

@ -10,9 +10,9 @@ import (
"strings"
"unicode"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// TextChunk represents a chunk of text along with a particular style.


+ 1
- 1
creator/text_chunk_test.go View File

@ -9,7 +9,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
func TestTextChunkWrap(t *testing.T) {


+ 1
- 1
creator/text_style.go View File

@ -6,7 +6,7 @@
package creator
import (
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
// TextStyle is a collection of properties that can be assigned to a chunk of text.


+ 1
- 1
creator/toc_line.go View File

@ -8,7 +8,7 @@ package creator
import (
"strings"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
// TOCLine represents a line in a table of contents.


+ 1
- 1
creator/toc_test.go View File

@ -7,7 +7,7 @@ package creator
import (
"testing"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
func TestTOCAdvanced(t *testing.T) {


+ 2
- 2
creator/utils.go View File

@ -8,8 +8,8 @@ package creator
import (
"os"
"maze.io/x/unipdf/v3/contentstream/draw"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/contentstream/draw"
"maze.io/x/unipdf/model"
)
// Loads the template from path as a list of pages.


+ 1
- 1
extractor/extractor.go View File

@ -6,7 +6,7 @@
package extractor
import (
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
// Extractor stores and offers functionality for extracting content from PDF pages.


+ 4
- 4
extractor/image.go View File

@ -6,10 +6,10 @@
package extractor
import (
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// ImageExtractOptions contains options for controlling image extraction from


+ 2
- 2
extractor/image_test.go View File

@ -14,8 +14,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
func TestImageExtractionBasic(t *testing.T) {


+ 5
- 5
extractor/text.go View File

@ -13,11 +13,11 @@ import (
"strings"
"unicode"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/contentstream"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/internal/transform"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/contentstream"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/internal/transform"
"maze.io/x/unipdf/model"
"golang.org/x/text/unicode/norm"
)


+ 4
- 4
extractor/text_test.go View File

@ -20,10 +20,10 @@ import (
"strings"
"testing"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/creator"
"maze.io/x/unipdf/v3/internal/transform"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/creator"
"maze.io/x/unipdf/internal/transform"
"maze.io/x/unipdf/model"
"golang.org/x/text/unicode/norm"
)


+ 2
- 2
extractor/utils.go View File

@ -9,8 +9,8 @@ import (
"bytes"
"fmt"
"maze.io/x/unipdf/v3/common/license"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/common/license"
"maze.io/x/unipdf/core"
)
// RenderMode specifies the text rendering mode (Tmode), which determines whether showing text shall cause


+ 1
- 1
fdf/fielddata.go View File

@ -11,7 +11,7 @@ import (
"os"
"sort"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/core"
)
// Data represents forms data format (FDF) file data.


+ 1
- 1
fdf/io.go View File

@ -10,7 +10,7 @@ import (
"errors"
"io"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// readAtLeast reads at least n bytes into slice p.


+ 2
- 2
fdf/parser.go View File

@ -17,8 +17,8 @@ import (
"strconv"
"strings"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
)
// Regular Expressions for parsing and identifying object signatures.


+ 1
- 1
fdf/parser_test.go View File

@ -9,7 +9,7 @@ import (
"fmt"
"testing"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/core"
)
const fdfExample1 = `


+ 2
- 2
fjson/fielddata.go View File

@ -10,8 +10,8 @@ import (
"io"
"os"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// FieldData represents form field data loaded from JSON file.


+ 1
- 1
fjson/fielddata_test.go View File

@ -12,7 +12,7 @@ import (
"strings"
"testing"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/model"
)
func TestLoadPDFFormData(t *testing.T) {


+ 1
- 1
internal/cmap/bcmaps_test.go View File

@ -9,7 +9,7 @@ import (
"testing"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/internal/cmap/bcmaps"
"maze.io/x/unipdf/internal/cmap/bcmaps"
)
func TestIsPredefinedCMap(t *testing.T) {


+ 3
- 3
internal/cmap/cmap.go View File

@ -10,9 +10,9 @@ import (
"sort"
"strings"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/internal/cmap/bcmaps"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/internal/cmap/bcmaps"
)
const (


+ 1
- 1
internal/cmap/cmap_parser.go View File

@ -10,7 +10,7 @@ import (
"fmt"
"io"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// parse parses the CMap file and loads into the CMap structure.


+ 2
- 2
internal/cmap/parser.go View File

@ -13,8 +13,8 @@ import (
"io"
"strconv"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/core"
)
// cMapParser parses CMap character to unicode mapping files.


+ 1
- 1
internal/cmap/utils.go View File

@ -8,7 +8,7 @@ package cmap
import (
"unicode/utf16"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// hexToCharCode returns the integer that is encoded in `shex` as a big-endian hex value


+ 2
- 2
internal/e2etest/allobjects_test.go View File

@ -12,8 +12,8 @@ import (
"path/filepath"
"testing"
"maze.io/x/unipdf/v3/core"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/core"
"maze.io/x/unipdf/model"
)
// The allobjects test probes through all objects in PDF files of a specified corpus, decoding streams.


+ 3
- 3
internal/e2etest/extract_images_test.go View File

@ -18,9 +18,9 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/extractor"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/extractor"
"maze.io/x/unipdf/model"
)
// Extract images test writes out a zip file containing all images extracted


+ 3
- 3
internal/e2etest/fdfmerge_test.go View File

@ -14,9 +14,9 @@ import (
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/annotator"
"maze.io/x/unipdf/v3/fdf"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/annotator"
"maze.io/x/unipdf/fdf"
"maze.io/x/unipdf/model"
)
// FDF merge tests merge FDF data into template PDF data and flattens to an output PDF file.


+ 2
- 2
internal/e2etest/passthrough_test.go View File

@ -12,8 +12,8 @@ import (
"path/filepath"
"testing"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/model"
)
// Passthrough benchmark loads a PDF, writes back out and performs a sanity check on the output with ghostscript.


+ 2
- 2
internal/e2etest/split_test.go View File

@ -12,8 +12,8 @@ import (
"testing"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/v3/model"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/model"
)
// Split tests splits a single page from a PDF, writes out and performs a sanity check on the output with ghostscript.


+ 1
- 1
internal/e2etest/validate.go View File

@ -13,7 +13,7 @@ import (
"os/exec"
"strings"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// To enable ghostscript validation, the path to the binary needs to be specified.


+ 1
- 1
internal/jbig2/basic/nums.go View File

@ -6,7 +6,7 @@
package basic
import (
"maze.io/x/unipdf/v3/internal/jbig2/errors"
"maze.io/x/unipdf/internal/jbig2/errors"
)
// IntSlice is the integer slice that contains panic safe methods.


+ 1
- 1
internal/jbig2/bitmap/bin-expand.go View File

@ -6,7 +6,7 @@
package bitmap
import (
"maze.io/x/unipdf/v3/internal/jbig2/errors"
"maze.io/x/unipdf/internal/jbig2/errors"
)
func expandBinaryFactor2(d, s *Bitmap) (err error) {


+ 1
- 1
internal/jbig2/bitmap/bin-expand_test.go View File

@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// TestExpandBinaryReplicate tests the expand binary functions.


+ 2
- 2
internal/jbig2/bitmap/bin-reduce.go View File

@ -8,9 +8,9 @@ package bitmap
import (
"encoding/binary"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/v3/internal/jbig2/errors"
"maze.io/x/unipdf/internal/jbig2/errors"
)
// reduceBinaryCascade performs up to four cascades 2x rank reductions.


+ 4
- 4
internal/jbig2/bitmap/bitmap.go View File

@ -10,11 +10,11 @@ import (
"image/color"
"math"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
"maze.io/x/unipdf/v3/internal/jbig2/errors"
"maze.io/x/unipdf/v3/internal/jbig2/reader"
"maze.io/x/unipdf/v3/internal/jbig2/writer"
"maze.io/x/unipdf/internal/jbig2/errors"
"maze.io/x/unipdf/internal/jbig2/reader"
"maze.io/x/unipdf/internal/jbig2/writer"
)
// tab8 contains number of '1' bits in each possible 8 bit value stored at it's index.


+ 1
- 1
internal/jbig2/bitmap/bitmap_test.go View File

@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"maze.io/x/unipdf/v3/common"
"maze.io/x/unipdf/common"
)
// TestBitmap tests the bitmap methods and constructors.


+ 2
- 2
internal/jbig2/bitmap/boxes.go View File

@ -8,8 +8,8 @@ package bitmap
import (
"image"
"maze.io/x/unipdf/v3/internal/jbig2/basic"
"maze.io/x/unipdf/v3/internal/jbig2/errors"
"maze.io/x/unipdf/internal/jbig2/basic"
"maze.io/x/unipdf/internal/jbig2/errors"
)
// Boxes is the wrapper over the slice of image.Rectangles that allows to


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save