/** * Tells you if the node contains an indirect reference. * * @return true if the object is an indirect reference */ public boolean isIndirectReference() { return object.isIndirectReference(); }
@Override public PdfObject getValue() { PdfObject obj = entry.getValue(); if (obj != null && obj.isIndirectReference()) { obj = ((PdfIndirectReference) obj).getRefersTo(true); } return obj; }
static boolean equalContent(PdfObject obj1, PdfObject obj2) { PdfObject direct1 = obj1 != null && obj1.isIndirectReference() ? ((PdfIndirectReference)obj1).getRefersTo(true) : obj1; PdfObject direct2 = obj2 != null && obj2.isIndirectReference() ? ((PdfIndirectReference)obj2).getRefersTo(true) : obj2; return direct1 != null && direct1.equals(direct2); } }
@Override public PdfObject next() { PdfObject obj = parentIterator.next(); if (obj != null && obj.isIndirectReference()) { obj = ((PdfIndirectReference) obj).getRefersTo(true); } return obj; }
@Override public PdfObject next() { PdfObject obj = array.next(); if (obj.isIndirectReference()) { obj = ((PdfIndirectReference) obj).getRefersTo(true); } return obj; }
private boolean isKeyRefersBack(PdfDictionary dic, PdfName key) { // TODO review this method? // ignore recursive call return key.equals(PdfName.P) && (dic.get(key).isIndirectReference() || dic.get(key).isDictionary()) || key.equals(PdfName.Parent); } }
PdfObject cmpDirectObj = null; if (outObj != null) outDirectObj = outObj.isIndirectReference() ? ((PdfIndirectReference) outObj).getRefersTo(false) : outObj; if (cmpObj != null) cmpDirectObj = cmpObj.isIndirectReference() ? ((PdfIndirectReference) cmpObj).getRefersTo(false) : cmpObj; compareResult.addError(currentPath, MessageFormatUtil.format("Types do not match. Expected: {0}. Found: {1}.", cmpDirectObj.getClass().getSimpleName(), outDirectObj.getClass().getSimpleName())); return false; } else if (cmpObj.isIndirectReference() && !outObj.isIndirectReference()) { compareResult.addError(currentPath, "Expected indirect object."); return false; } else if (!cmpObj.isIndirectReference() && outObj.isIndirectReference()) { compareResult.addError(currentPath, "Expected direct object."); return false; if (currentPath != null && cmpObj.isIndirectReference() && outObj.isIndirectReference()) { if (currentPath.isComparing((PdfIndirectReference) cmpObj, (PdfIndirectReference) outObj)) return true; return false; PdfIndirectReference cmpRefKey = cmpObj.isIndirectReference() ? (PdfIndirectReference) cmpObj : cmpObj.getIndirectReference(); PdfIndirectReference outRefKey = outObj.isIndirectReference() ? (PdfIndirectReference) outObj : outObj.getIndirectReference();
ByteBuffer savedBb = null; if (obj.isIndirectReference()) { reference = (PdfIndirectReference) obj; byte[] cached = serializedCache.get(reference);
if (obj.isIndirectReference()) { PdfObject refTo = ((PdfIndirectReference) obj).getRefersTo(); obj = refTo != null ? refTo : obj;
if (pdfColorSpace.getPdfObject().isIndirectReference()) { pdfObject = ((PdfIndirectReference) pdfColorSpace.getPdfObject()).getRefersTo(); } else {
public static PdfColorSpace makeColorSpace(PdfObject pdfObject) { if (pdfObject.isIndirectReference()) pdfObject = ((PdfIndirectReference) pdfObject).getRefersTo(); if (pdfObject.isArray() && ((PdfArray) pdfObject).size() == 1)
if (pdfObject.isIndirectReference()) pdfObject = ((PdfIndirectReference) pdfObject).getRefersTo(); if (pdfObject.isDictionary()) {