mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-07 19:29:16 +08:00
Handle indirect Xobjects
This commit is contained in:
parent
a1d15f3838
commit
ff7dbe17e9
@ -767,6 +767,8 @@ type PdfPageResourcesColorspaces struct {
|
|||||||
container *PdfIndirectObject
|
container *PdfIndirectObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func newPdfPageResourcesColorspacesFromPdfObject(obj PdfObject) (*PdfPageResourcesColorspaces, error) {
|
func newPdfPageResourcesColorspacesFromPdfObject(obj PdfObject) (*PdfPageResourcesColorspaces, error) {
|
||||||
colorspaces := &PdfPageResourcesColorspaces{}
|
colorspaces := &PdfPageResourcesColorspaces{}
|
||||||
|
|
||||||
@ -913,7 +915,9 @@ func (r *PdfPageResources) GetXObjectByName(keyName string) (*PdfObjectStream, X
|
|||||||
return nil, XObjectTypeUndefined
|
return nil, XObjectTypeUndefined
|
||||||
}
|
}
|
||||||
|
|
||||||
xresDict, has := r.XObject.(*PdfObjectDictionary)
|
xobj := TraceToDirectObject(r.XObject)
|
||||||
|
|
||||||
|
xresDict, has := xobj.(*PdfObjectDictionary)
|
||||||
if !has {
|
if !has {
|
||||||
return nil, XObjectTypeUndefined
|
return nil, XObjectTypeUndefined
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user