We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2828a90 commit 47bec78Copy full SHA for 47bec78
PdfSharpCore/Pdf/PdfOutline.cs
@@ -389,7 +389,9 @@ void SplitDestinationPage(PdfArray destination) // Reference: 8.2 Destination s
389
#pragma warning disable 162
390
391
// The destination page may not yet transformed to PdfPage.
392
- PdfDictionary destPage = (PdfDictionary)((PdfReference)(destination.Elements[0])).Value;
+ PdfDictionary destPage = (destination.Elements[0] is PdfInteger) ?
393
+ destination.Owner.Pages[((PdfInteger)destination.Elements[0]).Value] :
394
+ (PdfDictionary)((PdfReference)destination.Elements[0]).Value;
395
PdfPage page = destPage as PdfPage;
396
if (page == null)
397
page = new PdfPage(destPage);
0 commit comments