The following code tests to see if any of the revisions in a
document are hybrid.
bool isHybrid = false;
using var doc = new Doc();
doc.Read(Server.MapPath("../mypics/sample.pdf"));
using (var eof = new ObjectSoup.Eof()) {
eof.Load(doc.ObjectSoup);
var xref = eof.XRef;
while (xref != null) {
if (xref.Type == ObjectSoup.XRefType.Hybrid) {
isHybrid = true;
break;
}
xref = xref.Prev;
}
}
// do something with isHybrid
Dim isHybrid As Boolean = False
Using doc = New Doc()
doc.Read(Server.MapPath("../mypics/sample.pdf"))
Using eof = New ObjectSoup.Eof()
eof.Load(doc.ObjectSoup)
Dim xref = eof.XRef
While xref <> Nothing
If xref.Type = ObjectSoup.XRefType.Hybrid Then
isHybrid = True
Exit While
End If
xref = xref.Prev
End While
' do something with isHybrid
End Using
End Using