mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-04 22:17:22 +08:00
Removed debug code
This commit is contained in:
parent
17d1112436
commit
5d513ac8cf
@ -5,7 +5,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/unidoc/unidoc/pdf/core"
|
"github.com/unidoc/unidoc/pdf/core"
|
||||||
@ -267,7 +266,7 @@ func parsePdfObjects(text string) (map[int]core.PdfObject, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Replace the indirect objects in all dicts with their values, if they are in numObj.
|
// Replace the indirect objects in all dicts with their values, if they are in numObj.
|
||||||
for i, obj := range numObj {
|
for _, obj := range numObj {
|
||||||
iobj, ok := obj.(*core.PdfIndirectObject)
|
iobj, ok := obj.(*core.PdfIndirectObject)
|
||||||
if !ok {
|
if !ok {
|
||||||
continue
|
continue
|
||||||
@ -283,16 +282,7 @@ func parsePdfObjects(text string) (map[int]core.PdfObject, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Printf("%d 0 obj %s\n", i, showDict(dict))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return numObj, nil
|
return numObj, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func showDict(dict *core.PdfObjectDictionary) string {
|
|
||||||
parts := []string{}
|
|
||||||
for _, k := range dict.Keys() {
|
|
||||||
parts = append(parts, fmt.Sprintf("%s: %T", k, dict.Get(k)))
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("{%s}", strings.Join(parts, ", "))
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user