protected internal void ReadPdfPartial() {
try {
fileLength = tokens.File.Length;
pdfVersion = tokens.CheckPdfHeader();
try {
ReadXref();
}
catch (Exception e) {
try {
rebuilt = true;
RebuildXref();
lastXref = -1;
}
catch (Exception ne) {
throw new InvalidPdfException("Rebuild failed: " + ne.Message + "; Original message: " + e.Message);
}
}
ReadDocObjPartial();
ReadPages();
}
catch (IOException e) {
try{tokens.Close();}catch{}
throw e;
}
}