Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion PdfSharpCore/Pdf/PdfOutline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ void SplitDestinationPage(PdfArray destination) // Reference: 8.2 Destination s
#pragma warning disable 162

// The destination page may not yet transformed to PdfPage.
PdfDictionary destPage = (PdfDictionary)((PdfReference)(destination.Elements[0])).Value;
PdfDictionary destPage = (destination.Elements[0] is PdfInteger) ?
destination.Owner.Pages[((PdfInteger)destination.Elements[0]).Value] :
(PdfDictionary)((PdfReference)destination.Elements[0]).Value;
PdfPage page = destPage as PdfPage;
if (page == null)
page = new PdfPage(destPage);
Expand Down