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