Skip to content

Commit

Permalink
Merge pull request #934 from openpreserve/samalloing-patch-7
Browse files Browse the repository at this point in the history
Added indirect reference in Destination
  • Loading branch information
carlwilson authored Aug 13, 2024
2 parents d02dc55 + 3763136 commit 8209f27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4285,7 +4285,7 @@ protected boolean doOutlineStuff(RepInfo info) {
* We return the page sequence number for the referenced page.
* If we can't find a match for the reference, we return -1.
*/
protected int resolveIndirectDest(PdfSimpleObject key, RepInfo info) throws PdfException {
protected int resolveIndirectDest(PdfSimpleObject key, RepInfo info) throws PdfException, IOException {
if (key == null) {
throw new IllegalArgumentException("Argument key can not be null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,17 @@ public final class Destination {
* from a named destination.
*/
public Destination(final PdfObject destObj, final PdfModule module,
final boolean named) throws PdfException {
final boolean named) throws PdfException, IOException {
if (destObj == null) {
throw new IllegalArgumentException("Parameter destObj cannot be null.");
}
if (!named && destObj instanceof PdfSimpleObject) {
_indirect = true;
_indirectDest = (PdfSimpleObject) destObj;
return;
} else if (!named && destObj instanceof PdfIndirectObj) {
_pageDest = findDirectDest(module, (PdfArray) module.resolveIndirectObject(destObj));
return;
}
PdfArray destArray = null;
try {
Expand Down

0 comments on commit 8209f27

Please sign in to comment.