mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-26 13:48:55 +08:00
Resolve page parents when adding page to writer (#110)
This commit is contained in:
parent
2189002435
commit
2689453ae1
@ -584,7 +584,7 @@ func (w *PdfWriter) AddPage(page *PdfPage) error {
|
||||
|
||||
// Copy inherited fields if missing.
|
||||
inheritedFields := []core.PdfObjectName{"Resources", "MediaBox", "CropBox", "Rotate"}
|
||||
parent, hasParent := pDict.Get("Parent").(*core.PdfIndirectObject)
|
||||
parent, hasParent := core.GetIndirect(pDict.Get("Parent"))
|
||||
common.Log.Trace("Page Parent: %T (%v)", pDict.Get("Parent"), hasParent)
|
||||
for hasParent {
|
||||
common.Log.Trace("Page Parent: %T", parent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user