Skip to content

Commit

Permalink
Fix samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramzi committed Mar 28, 2023
1 parent da23094 commit d3d4bc3
Show file tree
Hide file tree
Showing 48 changed files with 84 additions and 50 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ A commercial license key is required for use in a production environment. Please

# Running PDFTron Go in your project

1. Import `github.com/pdftron/pdftron-go` into your project
1. Import `github.com/pdftron/pdftron-go/v2` into your project
a. On **Windows**, you will have to locate the DLLs for running the project and append them to your path.
```
set PATH=%GOPATH%/pkg/mod/github.com/pdftron/pdftron-go@your_version/shared_libs/win/Lib
set PATH=%GOPATH%/pkg/mod/github.com/pdftron/pdftron-go/v2@your_version/shared_libs/win/Lib
```
You may also copy these directly to your project directory.

Expand All @@ -32,7 +32,7 @@ A commercial license key is required for use in a production environment. Please
package main

import (
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)


Expand Down Expand Up @@ -62,8 +62,8 @@ func main() {
This can be done by modifying your go.mod via this command in your project directory.

```
go mod edit -require github.com/pdftron/pdftron-go@v0.0.2`
go mod tidy (or go get github.com/pdftron/pdftron-go)
go mod edit -require github.com/pdftron/pdftron-go/v2@v2.0.0`
go mod tidy (or go get github.com/pdftron/pdftron-go/v2)
```

# Project Structure
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/pdftron/pdftron-go/v2

go 1.15

require golang.org/x/text v0.8.0
32 changes: 32 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
2 changes: 1 addition & 1 deletion samples/AddImageTest/AddImage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/AnnotationTest/Annotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"flag"
"strconv"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/BookmarkTest/Bookmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"flag"
"os"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/CAD2PDFTest/CAD2PDF_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/ContentReplacerTest/ContentReplacer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/ConvertTest/Convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"flag"
"runtime"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/DataExtractionTest/DataExtraction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"os"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/DigitalSignaturesTest/DigitalSignatures_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import (
"strconv"
"flag"
"testing"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/ElementBuilderTest/ElementBuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"strings"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/ElementEditTest/ElementEdit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main
import (
"fmt"
"testing"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
"flag"
)

Expand Down
2 changes: 1 addition & 1 deletion samples/ElementReaderAdvTest/ElementReaderAdv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"strconv"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/ElementReaderTest/ElementReader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/EncTest/Enc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"strconv"
"testing"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
"flag"
)

Expand Down
2 changes: 1 addition & 1 deletion samples/FDFTest/FDF_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/HTML2PDFTest/HTML2PDF_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"strconv"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
"flag"
)

Expand Down
2 changes: 1 addition & 1 deletion samples/ImageExtractTest/ImageExtract_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"strconv"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/ImpositionTest/Impositon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/InteractiveFormsTest/InteractiveForms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"flag"
"os"
"math"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/JBIG2Test/JBIG2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main
import (
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/LogicalStructureTest/LogicalStructure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"flag"
"os"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/OCRTest/OCR_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/OfficeTemplateTest/OfficeTemplate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/OfficeToPDFTest/OfficeToPDF_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/OptimizerTest/Optimizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package main
import (
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDF2HtmlTest/PDF2Html_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDF2OfficeTest/PDF2Office_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"flag"
"fmt"
"testing"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDFATest/PDFA_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"flag"
"strconv"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDFDocMemoryTest/PDFDocMemory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"os"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDFDrawTest/PDFDraw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"testing"
"os"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
"flag"
)

Expand Down
2 changes: 1 addition & 1 deletion samples/PDFLayersTest/PDFLayers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"flag"
"fmt"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDFPackageTest/PDFPackage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strconv"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDFPageTest/PDFPage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"strconv"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDFPrintTest/PDFPrint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"flag"
"runtime"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PDFRedactTest/PDFRedact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PageLabelsTest/PDFLabels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"flag"
"strconv"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
2 changes: 1 addition & 1 deletion samples/PatternTest/Pattern_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"testing"
"flag"
. "github.com/pdftron/pdftron-go"
. "github.com/pdftron/pdftron-go/v2"
)

var licenseKey string
Expand Down
Loading

0 comments on commit d3d4bc3

Please sign in to comment.