Nothing Special   »   [go: up one dir, main page]

Skip to content

Commit

Permalink
Fix #394
Browse files Browse the repository at this point in the history
  • Loading branch information
hhrutter committed Nov 30, 2021
1 parent 72e4e71 commit 6509cea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/pdfcpu/optimize.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ func handleDuplicateFontObject(ctx *Context, fontDict Dict, fName, rName string,
for _, fontObjNr := range fontObjNrs {

// Get the font object from the lookup table.
fontObject := ctx.Optimize.FontObjects[fontObjNr]
fontObject, ok := ctx.Optimize.FontObjects[fontObjNr]
if !ok {
continue
}

log.Optimize.Printf("handleDuplicateFontObject: comparing with fontDict Obj %d\n", fontObjNr)

Expand Down
3 changes: 2 additions & 1 deletion pkg/pdfcpu/pages.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ func AddPages(ctx, ctxDest *Context, pages []int, usePgCache bool) error {

// Move page i and required resources into new context.

consolidateRes := true
consolidateRes := false
// TODO consolidate via optimize flag
d, _, inhPAttrs, err := ctx.PageDict(i, consolidateRes)
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions pkg/pdfcpu/parseContent.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func skipBI(l *string, prn PageResourceNames) error {
s = s[2:]
break
}
// TODO Check len(s) > 0
if s[0] == '/' {
s = s[1:]
i, _ := positionToNextWhitespaceOrChar(s, "/")
Expand Down

0 comments on commit 6509cea

Please sign in to comment.