
#ifndef PDF_PDF_REP_H
#define PDF_PDF_REP_H

#include <poppler/goo/GooString.h>
#include <poppler/PDFDoc.h>
#include <poppler/XRef.h>    // fetch()
#include <poppler/Object.h>  // fetch(), is*(), get*()
#include <poppler/Array.h>   // getLength(), add(), get()
#include <poppler/Dict.h>    // add(), is(), lookup()
#include <poppler/Catalog.h>
#include "Iref.h"

// (Few users should #include this header directly.  It is provided as a
// separate header only for the benefit of callers of the discouraged
// function PDF::PDF::get_PDF_rep().)

namespace {
  struct PDF_rep;
}

struct PDF::PDF_rep {
  int      file_length1;
  PDFDoc  *pdfdoc      ;
  XRef    *xref        ;
  Dict    *trailer     ;
  int      n_obj1      ;
  // Following Libpoppler, `catalog' and `catalog2' give different
  // interfaces to the same PDF object.  The pointer `catalog_obj' is
  // stored only so that PDF::~PDF() can properly deallocate the thing
  // it points to, which is probably not directly useful otherwise.
  Object  *catalog_obj ;
  Dict    *catalog     ;
  Catalog *catalog2    ;
  Iref     info_iref   ;
  Object  *info_obj    ;
  Dict    *info        ;
};

#endif

