Skip to content

Commit

Permalink
Fix #88
Browse files Browse the repository at this point in the history
  • Loading branch information
hhrutter committed Jun 17, 2019
1 parent b2297a7 commit ef0eb1a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -68,11 +68,11 @@ Even if you want to dive right into pdfcpu backend integration it is highly reco

## Status

[Version: 0.1.24](https://github.com/hhrutter/pdfcpu/releases/tag/v0.1.24)
[Version: 0.1.25](https://github.com/hhrutter/pdfcpu/releases/tag/v0.1.25)

* Rudimentory support for AES-256 encryption as laid out in [Adobe® Supplement to the ISO 32000
BaseVersion: 1.7 ExtensionLevel: 3](https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/adobe_supplement_iso32000.pdf)
* Fixes #74-#77, #80-#83, #85, #86
* Fixes #88

## Reminder

Expand Down
3 changes: 0 additions & 3 deletions cmd/pdfcpu/main.go
Expand Up @@ -178,9 +178,6 @@ func main() {
os.Exit(1)
}

config.OwnerPW = opw
config.UserPW = upw

if cmd != nil {
process(cmd)
}
Expand Down
8 changes: 1 addition & 7 deletions cmd/pdfcpu/prepare.go
Expand Up @@ -438,8 +438,6 @@ func validateEncryptModeFlag() {
}
func validateEncryptFlags() {

fmt.Printf("mode:<%s> key:<%s>\n", mode, key)

validateEncryptModeFlag()

if perm != "none" && perm != "all" && perm != "" {
Expand All @@ -464,7 +462,7 @@ func prepareEncryptCommand(config *pdfcpu.Configuration) *api.Command {
}

if config.OwnerPW == "" {
fmt.Fprintf(os.Stderr, "missing non-empty owner password")
fmt.Fprintln(os.Stderr, "missing non-empty owner password!")
fmt.Fprintf(os.Stderr, "%s\n\n", usageEncrypt)
os.Exit(1)
}
Expand Down Expand Up @@ -566,7 +564,6 @@ func prepareWatermarksCommand(config *pdfcpu.Configuration, onTop bool) *api.Com
os.Exit(1)
}

//fmt.Printf("details: <%s>\n", flag.Arg(0))
wm, err := pdfcpu.ParseWatermarkDetails(flag.Arg(0), onTop)
if err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
Expand Down Expand Up @@ -635,7 +632,6 @@ func prepareImportImagesCommand(config *pdfcpu.Configuration) *api.Command {
}

// pdfcpu import description outFile imageFile...
//fmt.Printf("details: <%s>\n", flag.Arg(0))
imp, err := pdfcpu.ParseImportDetails(flag.Arg(0))
if err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
Expand Down Expand Up @@ -819,7 +815,6 @@ func prepareNUpCommand(config *pdfcpu.Configuration) *api.Command {
}

// pdfcpu nup description outFile n inFile|imageFiles...
//fmt.Printf("details: <%s>\n", flag.Arg(0))
err = pdfcpu.ParseNUpDetails(flag.Arg(0), nup)
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
Expand Down Expand Up @@ -859,7 +854,6 @@ func prepareGridCommand(config *pdfcpu.Configuration) *api.Command {
}

// pdfcpu grid description outFile m n inFile|imageFiles...
//fmt.Printf("details: <%s>\n", flag.Arg(0))
err = pdfcpu.ParseNUpDetails(flag.Arg(0), nup)
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
Expand Down
3 changes: 3 additions & 0 deletions cmd/pdfcpu/registry.go
Expand Up @@ -78,6 +78,9 @@ func (m CommandMap) Handle(cmdPrefix string, command string, config *pdfcpu.Conf

parseFlags(m[cmdStr])

config.OwnerPW = opw
config.UserPW = upw

if m[cmdStr].handler != nil {
return m[cmdStr].handler(config), command, nil
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/pdfcpu/imageRead.go
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package pdfcpu

import (
"fmt"
"image"
"image/color"
"image/jpeg"
Expand Down Expand Up @@ -351,7 +350,7 @@ func imgToImageDict(xRefTable *XRefTable, img image.Image) (*StreamDict, error)
// fmt.Println("YCbCr")

default:
fmt.Printf("unknown color model: %T\n", img)
//fmt.Printf("unknown color model: %T\n", img)
return nil, ErrUnsupportedColorSpace

}
Expand Down
2 changes: 1 addition & 1 deletion pkg/pdfcpu/version.go
Expand Up @@ -24,7 +24,7 @@ import (

const (
// PDFCPUVersion returns the current pdfcpu version.
PDFCPUVersion = "0.1.24"
PDFCPUVersion = "0.1.25"

// PDFCPULongVersion returns pdfcpu's signature.
PDFCPULongVersion = "pdfcpu v" + PDFCPUVersion
Expand Down

0 comments on commit ef0eb1a

Please sign in to comment.