Back to index

tetex-bin  3.0
Functions
pdfdoc.h File Reference
#include "pdfobj.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void pdf_doc_new_page (void)
void pdf_doc_finish_page (void)
pdf_objpdf_doc_this_page_ref (void)
pdf_objpdf_doc_this_page (void)
pdf_objpdf_doc_page_tree (void)
pdf_objpdf_doc_catalog (void)
void pdf_doc_creator (char *s)
pdf_objpdf_doc_names (void)
pdf_objpdf_doc_next_page_ref (void)
pdf_objpdf_doc_prev_page_ref (void)
pdf_objpdf_doc_ref_page (unsigned long page_no)
void pdf_doc_add_to_page_resources (const char *name, pdf_obj *resources)
void pdf_doc_add_to_page_fonts (const char *name, pdf_obj *font)
void pdf_doc_add_to_page_xobjects (const char *name, pdf_obj *xobject)
pdf_objpdf_doc_current_page_resources (void)
void pdf_doc_add_to_page_annots (pdf_obj *annot)
void pdf_doc_add_dest (char *name, unsigned length, pdf_obj *array)
void pdf_doc_start_article (char *name, pdf_obj *info)
void pdf_doc_add_bead (char *name, pdf_obj *partial_dict)
void pdf_doc_merge_with_docinfo (pdf_obj *dictionary)
void pdf_doc_merge_with_catalog (pdf_obj *dictionary)
void pdf_doc_add_to_page (char *buffer, unsigned length)
void pdf_doc_change_outline_depth (int new_depth)
void pdf_doc_add_outline (pdf_obj *dict)
void pdf_doc_init (char *filename)
void pdf_doc_close (void)
void pdf_doc_comment (char *comment)
void pdf_doc_set_verbose (void)
void pdf_doc_set_debug (void)
void pdf_doc_bop (char *string, unsigned length)
void pdf_doc_eop (char *string, unsigned length)
void pdf_doc_set_origin (double x, double y)
void pdf_doc_this_bop (char *string, unsigned length)
void pdf_doc_this_eop (char *string, unsigned length)
void doc_make_form_xobj (pdf_obj *stream, pdf_obj *bbox, double refptx, double refpty, double xscale, double yscale, pdf_obj *resources, char *form_name)
pdf_objbegin_form_xobj (double xpos, double ypos, double bbllx, double bblly, double bburx, double bbury, char *form_name)
void end_form_xobj (void)
void pdf_doc_enable_thumbnails (void)
void pdf_doc_begin_annot (pdf_obj *dict)
void pdf_doc_set_box (void)
void pdf_doc_end_annot (void)
void pdf_doc_flush_annot (void)
void pdf_doc_expand_box (double llx, double lly, double urx, double ury)

Function Documentation

pdf_obj* begin_form_xobj ( double  xpos,
double  ypos,
double  bbllx,
double  bblly,
double  bburx,
double  bbury,
char *  form_name 
)

Definition at line 1130 of file pdfdoc.c.

{
  pdf_obj *bbox;
  if (xobjects_pending >= sizeof(res_stack)/sizeof(res_stack[0])) {
    fprintf (stderr, "\nForm XObjects nested too deeply.  Limit is %d\n",
            sizeof(res_stack)/sizeof(res_stack[0]));
    return NULL;
  }
  /* This is a real hack.  We basically treat each xobj as a separate mini
     page unto itself.  Save all the page structures and reinitialize
     them when we finish this xobject. */
  res_stack[xobjects_pending].save_page_resources = current_page_resources;
  current_page_resources = NULL;
  res_stack[xobjects_pending].save_page_xobjects = this_page_xobjects;
  this_page_xobjects = NULL;
  res_stack[xobjects_pending].save_page_fonts = this_page_fonts;
  this_page_fonts = NULL;
  res_stack[xobjects_pending].save_page_contents = this_page_contents;
  this_page_contents = NULL;
  res_stack[xobjects_pending].xform_depth = dev_xform_depth();
  xobjects_pending += 1;
  start_current_page_resources(); /* Starts current_page_resources */
  this_page_contents = pdf_new_stream (STREAM_COMPRESS);
  /* Make a bounding box for this Xobject */
  /* Translate coordinate system so reference point of object 
     is at 0 */
  bbox = pdf_new_array ();
  pdf_add_array (bbox, pdf_new_number (ROUND(bbllx,0.01)));
  pdf_add_array (bbox, pdf_new_number (ROUND(bblly,0.01)));
  pdf_add_array (bbox, pdf_new_number (ROUND(bburx,0.01)));
  pdf_add_array (bbox, pdf_new_number (ROUND(bbury,0.01)));
  /* Resource is already made, so call doc_make_form_xobj() */
  doc_make_form_xobj (this_page_contents, bbox,
                    xpos, ypos, 1.0, 1.0,
                    pdf_ref_obj(current_page_resources), res_name);
  /* Make sure the object is self-contained by adding the
     current font to the object stream */
  dev_reselect_font();
  /* Likewise for color */
  dev_do_color();
  return pdf_link_obj (this_page_contents);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void doc_make_form_xobj ( pdf_obj stream,
pdf_obj bbox,
double  refptx,
double  refpty,
double  xscale,
double  yscale,
pdf_obj resources,
char *  form_name 
)

Definition at line 1092 of file pdfdoc.c.

{
  pdf_obj *xobj_dict, *tmp1;
  xobj_dict = pdf_stream_dict (this_form_contents);
  
  pdf_add_dict (xobj_dict, pdf_new_name ("Name"), pdf_new_name(form_name));
  pdf_add_dict (xobj_dict, pdf_link_obj (type_name),
              pdf_new_name ("XObject"));
  pdf_add_dict (xobj_dict, pdf_new_name ("Subtype"),
              pdf_new_name ("Form"));
  pdf_add_dict (xobj_dict, pdf_new_name ("BBox"), bbox);
  pdf_add_dict (xobj_dict, pdf_new_name ("FormType"), 
              pdf_new_number(1.0));
  /* The reference point of an Xobject is at the lower left corner
     of the bounding box.  Since we would like to have an arbitrary
     reference point, we use a transformation matrix, translating
     the reference point to (0,0) */
  tmp1 = build_scale_array (xscale, 0, 0, yscale, -xscale*refptx, -yscale*refpty);
  pdf_add_dict (xobj_dict, pdf_new_name ("Matrix"), tmp1);
  pdf_add_dict (xobj_dict, pdf_link_obj (resources_name), resources);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1175 of file pdfdoc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_add_bead ( char *  name,
pdf_obj partial_dict 
)

Definition at line 721 of file pdfdoc.c.

{
  /* partial_dict should have P (Page) and R (Rect) already filled in */
  /* See if the specified article exists */
  int i;
  for (i=0; i<number_articles; i++) {
    if (!strcmp (articles[i].name, article_name))
      break;
  }
  if (i == number_articles) {
    fprintf (stderr, "Bead specified thread that doesn't exist\n");
    return;
  }
  /* Is this the first bead? */
  if (articles[i].last == NULL) {
    articles[i].first = pdf_link_obj (partial_dict);
    /* Add pointer to its first object */ 
    pdf_add_dict (articles[i].this,
                pdf_new_name ("F"),
                pdf_ref_obj (articles[i].first));
    /* Next add pointer to its Info dictionary */
    pdf_add_dict (articles[i].this,
                pdf_new_name ("I"),
                pdf_ref_obj (articles[i].info));
    /* Point first bead to parent article */
    pdf_add_dict (partial_dict,
                pdf_new_name ("T"),
                pdf_ref_obj (articles[i].this));
    /* Ship it out and forget it */
    pdf_add_array (articles_array, pdf_ref_obj (articles[i].this));
    pdf_release_obj (articles[i].this);
    articles[i].this = NULL;
  } else {
    /* Link it in... */
    /* Point last object to this one */
    pdf_add_dict (articles[i].last,
                pdf_new_name ("N"),
                pdf_ref_obj (partial_dict));
    /* Point this one to last */
    pdf_add_dict (partial_dict,
                pdf_new_name ("V"),
                pdf_ref_obj (articles[i].last));
    pdf_release_obj (articles[i].last);
  }
  articles[i].last = partial_dict;
  if (this_page_beads == NULL)
    this_page_beads = pdf_new_array();
  pdf_add_array (this_page_beads,
               pdf_ref_obj (partial_dict));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_add_dest ( char *  name,
unsigned  length,
pdf_obj array 
)

Definition at line 663 of file pdfdoc.c.

{
#ifdef MEM_DEBUG
MEM_START
#endif
  if (number_dests >= max_dests) {
    max_dests += DESTS_ALLOC_SIZE;
    dests = RENEW (dests, max_dests, dest_entry);
  }
  dests[number_dests].name = NEW (length, char);
  memcpy (dests[number_dests].name, name, length);
  dests[number_dests].length = length;
  dests[number_dests].array = array_ref;
  number_dests++;
#ifdef MEM_DEBUG
MEM_END
#endif
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 540 of file pdfdoc.c.

{
  pdf_obj *new_entry;
  if (outline_depth < 1)
    ERROR ("Can't add to outline at depth < 1");
  new_entry = pdf_new_dict ();
  pdf_merge_dict (new_entry, dict);
  /* Caller doesn't know we don't actually use the dictionary,
     so he *gave* dict to us.  We have to free it */
  pdf_release_obj (dict);
  /* Tell it where its parent is */
  pdf_add_dict (new_entry,
              pdf_link_obj (parent_name),
              pdf_ref_obj (outline[outline_depth-1].entry));
  /* Give mom and dad the good news */
  outline[outline_depth-1].kid_count += 1;

  /* Is this the first entry at this depth? */
  if (outline[outline_depth].entry == NULL) {
    /* Is so, tell the parent we are first born */
    pdf_add_dict (outline[outline_depth-1].entry,
                pdf_new_name ("First"),
                pdf_ref_obj (new_entry));
  }
  else {
    /* Point us back to sister */
    pdf_add_dict (new_entry,
                pdf_new_name ("Prev"),
                pdf_ref_obj (outline[outline_depth].entry));
    /* Point our elder sister toward us */
    pdf_add_dict (outline[outline_depth].entry,
                pdf_new_name ("Next"),
                pdf_ref_obj (new_entry));
    /* Bye-Bye sis */
    pdf_release_obj (outline[outline_depth].entry);
  }
  outline[outline_depth].entry = new_entry;
  /* Just born, so don't have any kids */
  outline[outline_depth].kid_count = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_add_to_page ( char *  buffer,
unsigned  length 
)

Definition at line 996 of file pdfdoc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 378 of file pdfdoc.c.

{
  if (debug) {
    fprintf (stderr, "(pdf_doc_add_to_page_annots)");
  }
  if (this_page_annots == NULL)
    this_page_annots = pdf_new_array ();
  pdf_add_array (this_page_annots,
               annot);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_add_to_page_fonts ( const char *  name,
pdf_obj font 
)

Definition at line 335 of file pdfdoc.c.

{
#ifdef MEM_DEBUG
  MEM_START;
#endif

  if (debug) {
    fprintf (stderr, "(pdf_doc_add_to_page_fonts)");
  }
  if (this_page_fonts == NULL)
    this_page_fonts = pdf_new_dict();
  pdf_add_dict (this_page_fonts,
              pdf_new_name (name), resource);
#ifdef MEM_DEBUG
MEM_END
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_add_to_page_resources ( const char *  name,
pdf_obj resources 
)

Definition at line 368 of file pdfdoc.c.

{
  if (debug) {
    fprintf (stderr, "(pdf_doc_add_to_page_resources)");
  }
  pdf_add_dict (current_page_resources,
              pdf_new_name (name), 
              resource);
}

Here is the call graph for this function:

void pdf_doc_add_to_page_xobjects ( const char *  name,
pdf_obj xobject 
)

Definition at line 354 of file pdfdoc.c.

{
  if (debug) {
    fprintf (stderr, "(pdf_doc_add_to_page_xojects)");
  }
  if (this_page_xobjects == NULL)
    this_page_xobjects = pdf_new_dict ();
  pdf_add_dict (this_page_xobjects,
              pdf_new_name (name), 
              resource);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1237 of file pdfdoc.c.

{
  breaking_state.annot_dict = dict;
  pdf_doc_set_box ();
  dev_tag_depth ();
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_bop ( char *  string,
unsigned  length 
)

Definition at line 177 of file pdfdoc.c.

{
  if (length > 0)
    pdf_add_stream (glob_page_bop, string, length);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 930 of file pdfdoc.c.

{
  return catalog;
}

Here is the caller graph for this function:

Definition at line 487 of file pdfdoc.c.

{
  int i;
  if (debug) {
    fprintf (stderr, "(change_outline_depth)");
  }
  if (outline_depth >= MAX_OUTLINE_DEPTH -1)
    ERROR ("Outline is too deep.");
  if (new_depth == outline_depth)
    /* Nothing to do */
    return;
  if (new_depth > outline_depth+1)
    ERROR ("Can't increase outline depth by more than one at a time\n");
  if (outline[outline_depth].entry == NULL)
    ERROR ("change_outline_depth: Fix me, I'm broke. This shouldn't happen!");
  /* Terminate all entries above this depth */
  for (i=outline_depth-1; i>=new_depth; i--) {
    pdf_add_dict (outline[i].entry,
                pdf_new_name ("Last"),
                pdf_ref_obj (outline[i+1].entry));
    if (i > 0) 
      tmp1 = pdf_new_number (-outline[i].kid_count);
    else
      tmp1 = pdf_new_number (outline[i].kid_count);

    pdf_add_dict (outline[i].entry,
                pdf_link_obj (count_name),
                tmp1);
  }
  /* Flush out all entries above this depth */
  for (i=new_depth+1; i<=outline_depth; i++) {
    pdf_release_obj (outline[i].entry);
    outline[i].entry = NULL;
    outline[i].kid_count = 0;
  }
  outline_depth = new_depth;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1035 of file pdfdoc.c.

{
  if (debug) fprintf (stderr, "pdf_doc_finish:\n");
#ifdef HAVE_LIBPNG
  if (thumb_basename)
    RELEASE (thumb_basename);
#endif /* HAVE_LIBPNG */
  /* Following things were kept around so user can add dictionary
     items */
  finish_docinfo();
  finish_page_tree();
  /* Add names dict to catalog */
  finish_outline();
  finish_dests_tree();
  finish_articles();
  pdf_add_dict (catalog,
              pdf_new_name ("Names"),
              pdf_ref_obj (names_dict));
  pdf_release_obj (names_dict);
  pdf_release_obj (catalog);
  /* Do consistency check on forward references to pages */
  if (highest_page_ref > page_count) {
    unsigned long i;
    fprintf (stderr, "\nWarning:  Nonexistent page(s) referenced\n");
    fprintf (stderr, "          (PDF file may not work right)\n");
    for (i=page_count; i<highest_page_ref; i++) {
      if (pages[i].page_dict) {
       pdf_release_obj (pages[i].page_dict);
       pdf_release_obj (pages[i].page_ref);
      }
    }
  }
  pdf_finish_specials();
  release_short_cuts();
  pdf_out_flush ();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_comment ( char *  comment)
void pdf_doc_creator ( char *  s)

Definition at line 1029 of file pdfdoc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 894 of file pdfdoc.c.

Here is the caller graph for this function:

Here is the caller graph for this function:

Definition at line 1245 of file pdfdoc.c.

{
  pdf_doc_flush_annot();
  breaking_state.annot_dict = NULL;
  dev_untag_depth ();
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_eop ( char *  string,
unsigned  length 
)

Definition at line 206 of file pdfdoc.c.

{
  if (length > 0)
    pdf_add_stream (glob_page_eop, string, length);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_expand_box ( double  llx,
double  lly,
double  urx,
double  ury 
)

Definition at line 1275 of file pdfdoc.c.

Here is the caller graph for this function:

Definition at line 809 of file pdfdoc.c.

{
#ifdef MEM_DEBUG
MEM_START
#endif  
  if (debug) {
    fprintf (stderr, "(pdf_doc_finish_page)");
  }
  finish_pending_xobjects();
  /* Flush this page */
  /* Page_count is the index of the current page, starting at 1 */
  tmp1 = pdf_new_array ();
  pdf_add_array (tmp1, pdf_ref_obj (glob_page_bop));
  if (this_page_bop) {
    pdf_add_array (tmp1, pdf_ref_obj (this_page_bop));
  }
  pdf_add_array (tmp1, pdf_link_obj (coord_xform_ref));
  pdf_add_array (tmp1, pdf_ref_obj (this_page_contents));
  pdf_add_array (tmp1, pdf_ref_obj (glob_page_eop));
  pdf_add_dict (pages[page_count].page_dict,
              pdf_link_obj(contents_name), tmp1);
  /* We keep .page_dict open because we don't know the parent yet */
  if (this_page_bop != NULL) {
    pdf_add_stream (this_page_bop, "\n", 1);
    pdf_release_obj (this_page_bop);
    this_page_bop = NULL;
  }
  if (this_page_contents != NULL) {
    pdf_add_stream (this_page_contents, "\n", 1);
    pdf_release_obj (this_page_contents);
    this_page_contents = NULL;
  }
  if (this_page_annots != NULL) {
    pdf_add_dict (pages[page_count].page_dict,
                pdf_link_obj(annots_name),
                pdf_ref_obj (this_page_annots));
    pdf_release_obj (this_page_annots);
    this_page_annots = NULL;
  }
  if (this_page_beads != NULL) {
    pdf_add_dict (pages[page_count].page_dict,
                pdf_link_obj (bead_name),
                pdf_ref_obj (this_page_beads));
    pdf_release_obj (this_page_beads);
    this_page_beads = NULL;
  }
  if (this_page_fonts != NULL) {
    pdf_add_dict (current_page_resources, 
                pdf_new_name ("Font"),
                pdf_ref_obj (this_page_fonts));
    pdf_release_obj (this_page_fonts);
    this_page_fonts = NULL;
  }
  if (this_page_xobjects != NULL) {
    pdf_add_dict (current_page_resources,
                pdf_new_name ("XObject"),
                pdf_ref_obj (this_page_xobjects));
    pdf_release_obj (this_page_xobjects);
    this_page_xobjects = NULL;
  }
  if (current_page_resources != NULL) {
    pdf_release_obj (current_page_resources);
    current_page_resources = NULL;
  }
#ifdef HAVE_LIBPNG
  if (thumbnail_opt) {
    char *thumb_filename;
    pdf_obj *thumbnail;
    thumb_filename = NEW (strlen(thumb_basename)+7, char);
    sprintf (thumb_filename, "%s.%ld", thumb_basename,
            page_count%99999+1L);
    thumbnail = do_thumbnail (thumb_filename);
    RELEASE (thumb_filename);
    if (thumbnail) 
      pdf_add_dict (pages[page_count].page_dict,
                  pdf_link_obj (thumb_name),
                  thumbnail);
  }
#endif
  page_count += 1;
#ifdef MEM_DEBUG
  MEM_END;
#endif  
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1253 of file pdfdoc.c.

{
  pdf_obj *rectangle, *new_dict;
  double grow;
  grow = pdf_special_tell_grow ();
  if (breaking_state.dirty) {
    rectangle = pdf_new_array ();
    pdf_add_array (rectangle, pdf_new_number(ROUND(breaking_state.llx-grow, 0.01)));
    pdf_add_array (rectangle, pdf_new_number(ROUND(breaking_state.lly-grow, 0.01)));
    pdf_add_array (rectangle, pdf_new_number(ROUND(breaking_state.urx+grow, 0.01)));
    pdf_add_array (rectangle, pdf_new_number(ROUND(breaking_state.ury+grow, 0.01)));
    new_dict = pdf_new_dict ();
    pdf_add_dict (new_dict, pdf_new_name ("Rect"),
                rectangle);
    pdf_merge_dict (new_dict, breaking_state.annot_dict);
    pdf_doc_add_to_page_annots (pdf_ref_obj (new_dict));
    pdf_release_obj (new_dict);
  }
  pdf_doc_set_box();
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_init ( char *  filename)

Definition at line 1001 of file pdfdoc.c.

{
#ifdef MEM_DEBUG
  MEM_START
#endif
  if (debug) fprintf (stderr, "pdf_doc_init:\n");
  pdf_out_init (filename);
#ifdef HAVE_LIBPNG
  /* Create a default name for thumbnail image files */
  if (thumbnail_opt) {
    if (strlen(filename)>4 && !strncmp (".pdf", filename+strlen(filename)-4,4)) {
      thumb_basename = NEW (strlen(filename)+1-4, char);
      strncpy (thumb_basename, filename, strlen(filename)-4);
      thumb_basename[strlen(filename)-4] = 0;
    } else {
      thumb_basename = NEW (strlen(filename)+1, char);
      strcpy (thumb_basename, filename);
    }
  }
#endif /* HAVE_LIBPNG */
  make_short_cuts();
  create_docinfo ();
  create_catalog ();
#ifdef MEM_DEBUG
  MEM_END
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 292 of file pdfdoc.c.

{
  pdf_merge_dict (catalog, dictionary);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 287 of file pdfdoc.c.

{
  pdf_merge_dict (docinfo, dictionary);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 920 of file pdfdoc.c.

{
  return names_dict;
}

Here is the caller graph for this function:

Definition at line 958 of file pdfdoc.c.

{
#ifdef MEM_DEBUG
MEM_START
#endif
  if (debug) {
    fprintf (stderr, "(pdf_doc_new_page)");
    fprintf (stderr, "page_count=%ld, max_pages=%ld\n", page_count,
            max_pages);
  }
  /* See if we need more pages allocated yet */
  if (page_count >= max_pages) {
    resize_pages(max_pages+PAGES_ALLOC_SIZE);
  }
  /* Was this page already instantiated by a forward reference to it? */
  if (pages[page_count].page_ref == NULL) {
    /* If not, create it. */
    pages[page_count].page_dict = pdf_new_dict ();
    /* and reference it */
    pages[page_count].page_ref = pdf_ref_obj(pages[page_count].page_dict);
  }
  pdf_add_dict (pages[page_count].page_dict,
              pdf_link_obj(type_name), pdf_link_obj(page_name));
  /* start the contents stream for the new page */
  this_page_contents = pdf_new_stream(STREAM_COMPRESS);
  start_current_page_resources();
  pdf_add_dict (pages[page_count].page_dict,
              pdf_link_obj (resources_name),
              pdf_ref_obj (current_page_resources));
  /* Contents are still available as this_page_contents until next
     page is started */
  /* Even though the page is gone, a Reference to this page is kept
     until program ends */
#ifdef MEM_DEBUG
MEM_END
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 953 of file pdfdoc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 925 of file pdfdoc.c.

{
  return page_tree;
}

Here is the caller graph for this function:

Definition at line 945 of file pdfdoc.c.

{
  if (page_count < 1) {
    ERROR ("Reference to previous page, but no pages have been completed yet");
  }
  return pdf_doc_ref_page(page_count>0?page_count:1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

pdf_obj* pdf_doc_ref_page ( unsigned long  page_no)

Definition at line 901 of file pdfdoc.c.

{
  if (debug)
    fprintf (stderr, "(doc_ref_page:page_no=%ld)", page_no);
  if (page_no >= max_pages) {
    resize_pages (page_no+PAGES_ALLOC_SIZE);
  }
  /* Has this page been referenced yet? */ 
  if (pages[page_no-1].page_dict == NULL) {
    /* If not, create it */
    pages[page_no-1].page_dict = pdf_new_dict ();
    /* and reference it */
    pages[page_no-1].page_ref = pdf_ref_obj (pages[page_no-1].page_dict);
  }
  if (page_no > highest_page_ref)
    highest_page_ref = page_no;
  return pdf_link_obj (pages[page_no-1].page_ref);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1227 of file pdfdoc.c.

{
  breaking_state.llx = dev_page_width();
  breaking_state.urx = 0;
  breaking_state.lly = dev_page_height();
  breaking_state.ury = 0;
  breaking_state.dirty = 0;
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 92 of file pdfdoc.c.

{
  debug = 1;
}
void pdf_doc_set_origin ( double  x,
double  y 
)

Definition at line 191 of file pdfdoc.c.

{
  int len;
  static char first = 1;
  if (first) {
    sprintf (work_buffer, "%g 0 0 %g %g %g cm\n",
            dvi_tell_mag()*pdf_dev_scale(), dvi_tell_mag()*pdf_dev_scale(),
            x, y);
    len = strlen (work_buffer);
    pdf_add_stream (coord_xform_stream, work_buffer, len);
    first = 0;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 86 of file pdfdoc.c.

{
  if (verbose < 255) 
    verbose += 1;
}

Here is the caller graph for this function:

void pdf_doc_start_article ( char *  name,
pdf_obj info 
)

Definition at line 702 of file pdfdoc.c.

{
  if (number_articles >= MAX_ARTICLES) {
    ERROR ("pdf_doc_add_article:  Too many articles\n");
  }
  if (name == NULL || strlen (name) == 0)
    ERROR ("pdf_doc_start_article called null name");
  articles[number_articles].name = NEW (strlen(name)+1, char);
  strcpy (articles[number_articles].name, name);
  articles[number_articles].info = info;
  articles[number_articles].first = NULL;
  articles[number_articles].last = NULL;
  /* Start dictionary for this article even though we can't finish it
     until we get the first bead */
  articles[number_articles].this = pdf_new_dict();
  number_articles++;
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_this_bop ( char *  string,
unsigned  length 
)

Definition at line 183 of file pdfdoc.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void pdf_doc_this_eop ( char *  string,
unsigned  length 
)

Definition at line 935 of file pdfdoc.c.

{
  return pages[page_count].page_dict;
}

Here is the caller graph for this function:

Definition at line 940 of file pdfdoc.c.

Here is the call graph for this function:

Here is the caller graph for this function: