Prepare for release. Update version.go and README. Fix testcase .

This commit is contained in:
Gunnsteinn Hall 2019-06-02 11:16:00 +00:00
parent 1dcde7d76e
commit 33945e7779
3 changed files with 29 additions and 29 deletions

View File

@ -1,53 +1,46 @@
# UniPDF - PDF for Go # UniPDF - PDF for Go
[UniDoc](http://unidoc.io)'s UniPDF is a powerful PDF library for Go (golang) with capabilities for [UniDoc](http://unidoc.io)'s unipdf (formerly unidoc) is a powerful PDF library for Go (golang) with capabilities for
creating and processing PDF files. The library is written and supported by creating and reading, processing PDF files. The library is written and supported by
the [FoxyUtils.com](https://foxyutils.com) website, where the library is used to power [FoxyUtils.com](https://foxyutils.com), where the library is used to power many of its services.
many of the PDF services offered.
[![Build Status](https://app.wercker.com/status/22b50db125a6d376080f3f0c80d085fa/s/master "wercker status")](https://app.wercker.com/project/bykey/22b50db125a6d376080f3f0c80d085fa) [![Build Status](https://app.wercker.com/status/22b50db125a6d376080f3f0c80d085fa/s/master "wercker status")](https://app.wercker.com/project/bykey/22b50db125a6d376080f3f0c80d085fa)
[![GitHub (pre-)release](https://img.shields.io/github/release/unidoc/unipdf/all.svg)](https://github.com/unidoc/unipdf/releases)
[![License: AGPL v3](https://img.shields.io/badge/License-Dual%20AGPL%20v3/Commercial-blue.svg)](https://www.gnu.org/licenses/agpl-3.0) [![License: AGPL v3](https://img.shields.io/badge/License-Dual%20AGPL%20v3/Commercial-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/unidoc/unipdf)](https://goreportcard.com/report/github.com/unidoc/unipdf) [![Go Report Card](https://goreportcard.com/badge/github.com/unidoc/unipdf)](https://goreportcard.com/report/github.com/unidoc/unipdf)
[![GoDoc](https://godoc.org/github.com/unidoc/unipdf?status.svg)](https://godoc.org/github.com/unidoc/unipdf) [![GoDoc](https://godoc.org/github.com/unidoc/unipdf?status.svg)](https://godoc.org/github.com/unidoc/unipdf)
## News ## News
- unidoc is being renamed to unipdf and will be maintained under https://github.com/unidoc/unipdf - unidoc has being renamed to unipdf and is maintained under https://github.com/unidoc/unipdf
- The old repository will remain under https://github.com/unidoc/unidoc for backwards compatibility and will be read-only. - The old repository remains under https://github.com/unidoc/unidoc for backwards compatibility and will be read-only.
All development will be under the unipdf repository. All development will be under the unipdf repository.
- The initial release of unipdf v3.0.0 will be compliant with Go modules from the start. - The initial release of unipdf v3.0.0 is compatible with Go modules from the start.
## Features ## Features
unipdf has a powerful set of features both for reading, processing and writing PDF. unipdf has multiple features for creating and modifying PDF:
The following list describes some key features:
- [x] [Create PDF reports](https://github.com/unidoc/unipdf-examples/blob/v3/report/pdf_report.go) - [x] [Create PDF reports](https://github.com/unidoc/unipdf-examples/blob/v3/report/pdf_report.go)
- [x] [Create PDF invoices](https://unidoc.io/news/simple-invoices) - [x] [Invoice creation](https://unidoc.io/news/simple-invoices)
- [x] Advanced table generation in the creator with subtable support - [x] Advanced table generation in the creator with subtable support
- [x] Paragraph in creator handling multiple styles within the same paragraph - [x] Paragraph in creator handling multiple styles within the same paragraph
- [x] Table of contents automatically generated
- [x] Text extraction significantly improved in quality and foundation in place for vectorized (position-based) text extraction (XY)
- [x] Image extraction with coordinates
- [x] [Merge PDF pages](https://github.com/unidoc/unipdf-examples/blob/v3/pages/pdf_merge.go) - [x] [Merge PDF pages](https://github.com/unidoc/unipdf-examples/blob/v3/pages/pdf_merge.go)
- [x] Merge page contents - [x] [Split PDF pages](https://github.com/unidoc/unipdf-examples/blob/v3/pages/pdf_split.go) and change page order
- [x] [Split PDF pages and change page order](https://github.com/unidoc/unipdf-examples/blob/v3/pages/pdf_split.go)
- [x] [Rotate pages](https://github.com/unidoc/unipdf-examples/blob/v3/pages/pdf_rotate.go) - [x] [Rotate pages](https://github.com/unidoc/unipdf-examples/blob/v3/pages/pdf_rotate.go)
- [x] [Extract text from PDF files](https://github.com/unidoc/unipdf-examples/blob/v3/text/pdf_extract_text.go) - [x] [Extract text from PDF files](https://github.com/unidoc/unipdf-examples/blob/v3/text/pdf_extract_text.go)
- [x] Extract images - [x] [Extract images](https://github.com/unidoc/unipdf-examples/blob/v3/image/pdf_extract_images.go) with coordinates
- [x] Add images to pages - [x] [Images to PDF](https://github.com/unidoc/unipdf-examples/blob/v3/image/pdf_images_to_pdf.go)
- [x] [Compress and optimize PDF output](https://github.com/unidoc/unipdf-examples/blob/v3/compress/pdf_optimize.g) - [x] [Add images to pages](https://github.com/unidoc/unipdf-examples/blob/v3/image/pdf_add_image_to_page.go)
- [x] [Draw watermark on PDF files](https://github.com/unidoc/unipdf-examples/blob/v3/image/pdf_watermark_image.go) - [x] [Compress and optimize PDF](https://github.com/unidoc/unipdf-examples/blob/v3/compress/pdf_optimize.go)
- [x] [Watermark PDF files](https://github.com/unidoc/unipdf-examples/blob/v3/image/pdf_watermark_image.go)
- [x] Advanced page manipulation (blocks/templates) - [x] Advanced page manipulation (blocks/templates)
- [x] Load PDF templates and modify - [x] Load PDF templates and modify
- [x] [Flatten forms and generate appearance streams](https://github.com/unidoc/unipdf-examples/blob/v3/forms/pdf_form_flatten.go)
- [x] [Fill out forms and FDF merging](https://github.com/unidoc/unipdf-examples/tree/v3/forms)
- [x] [FDF merge](https://github.com/unidoc/unipdf-examples/blob/v3/forms/pdf_form_fill_fdf_merge.go) and [form filling via JSON data](https://github.com/unidoc/unipdf-examples/blob/v3/forms/pdf_form_fill_json.go)
- [x] [Form creation](https://github.com/unidoc/unipdf-examples/blob/v3/forms/pdf_form_add.go) - [x] [Form creation](https://github.com/unidoc/unipdf-examples/blob/v3/forms/pdf_form_add.go)
- [x] [Fill and flatten forms](https://github.com/unidoc/unipdf-examples/blob/v3/forms/pdf_form_flatten.go)
- [x] [Fill out forms](https://github.com/unidoc/unipdf-examples/blob/v3/forms/pdf_form_fill_json.go) and [FDF merging](https://github.com/unidoc/unipdf-examples/blob/v3/forms/pdf_form_fill_fdf_merge.go)
- [x] [Unlock PDF files / remove password](https://github.com/unidoc/unipdf-examples/blob/v3/security/pdf_unlock.go) - [x] [Unlock PDF files / remove password](https://github.com/unidoc/unipdf-examples/blob/v3/security/pdf_unlock.go)
- [x] [Protect PDF files with a password](https://github.com/unidoc/unipdf-examples/blob/v3/security/pdf_protect.go) - [x] [Protect PDF files with a password](https://github.com/unidoc/unipdf-examples/blob/v3/security/pdf_protect.go)
- [x] [Digital signing validation and signing](https://github.com/unidoc/unipdf-examples/tree/v3/signatures) - [x] [Digital signing validation and signing](https://github.com/unidoc/unipdf-examples/tree/v3/signatures)
- [x] CCITTFaxDecode decoding and encoding support - [x] CCITTFaxDecode decoding and encoding support
- [x] Append mode
## Installation ## Installation
With modules: With modules:
@ -55,6 +48,11 @@ With modules:
go get github.com/unidoc/unipdf/v3 go get github.com/unidoc/unipdf/v3
~~~ ~~~
With GOPATH:
~~~
go get github.com/unidoc/unipdf/...
~~~
## How can I convince myself and my boss to buy unipdf rather using a free alternative? ## How can I convince myself and my boss to buy unipdf rather using a free alternative?

View File

@ -11,12 +11,12 @@ import (
) )
const releaseYear = 2019 const releaseYear = 2019
const releaseMonth = 4 const releaseMonth = 6
const releaseDay = 20 const releaseDay = 2
const releaseHour = 23 const releaseHour = 11
const releaseMin = 30 const releaseMin = 30
// Version holds version information, when bumping this make sure to bump the released at stamp also. // Version holds version information, when bumping this make sure to bump the released at stamp also.
const Version = "3.0.0-rc.1" const Version = "3.0.1"
var ReleasedAt = time.Date(releaseYear, releaseMonth, releaseDay, releaseHour, releaseMin, 0, 0, time.UTC) var ReleasedAt = time.Date(releaseYear, releaseMonth, releaseDay, releaseHour, releaseMin, 0, 0, time.UTC)

View File

@ -66,6 +66,8 @@ func TestAppenderNoop(t *testing.T) {
appender, err := model.NewPdfAppender(reader) appender, err := model.NewPdfAppender(reader)
require.NoError(t, err) require.NoError(t, err)
model.SetPdfProducer("UniPDF")
model.SetPdfCreator("UniDoc UniPDF")
err = appender.WriteToFile(tempFile("appender_noop.pdf")) err = appender.WriteToFile(tempFile("appender_noop.pdf"))
if err != nil { if err != nil {
t.Errorf("Fail: %v\n", err) t.Errorf("Fail: %v\n", err)
@ -123,7 +125,7 @@ func TestAppenderNoop(t *testing.T) {
3: core.XrefObject{ObjectNumber: 3, XType: 0, Offset: 178}, 3: core.XrefObject{ObjectNumber: 3, XType: 0, Offset: 178},
4: core.XrefObject{ObjectNumber: 4, XType: 0, Offset: 457}, 4: core.XrefObject{ObjectNumber: 4, XType: 0, Offset: 457},
5: core.XrefObject{ObjectNumber: 5, XType: 0, Offset: 740}, 5: core.XrefObject{ObjectNumber: 5, XType: 0, Offset: 740},
6: core.XrefObject{ObjectNumber: 6, XType: 0, Offset: 860}, 6: core.XrefObject{ObjectNumber: 6, XType: 0, Offset: 802},
} }
require.Equal(t, expected, xrefs.ObjectMap) require.Equal(t, expected, xrefs.ObjectMap)
} }