Back to index

texmacs  1.0.7.15
Defines | Functions | Variables
pdf_renderer.cpp File Reference
#include "pdf_renderer.hpp"
#include "Metafont/tex_files.hpp"
#include "Freetype/tt_file.hpp"
#include "file.hpp"
#include "image_files.hpp"
#include "analyze.hpp"
#include "iterator.hpp"
#include "merge_sort.hpp"
#include "scheme.hpp"
#include "sys_utils.hpp"
#include "convert.hpp"
#include "dvipdfmx/pdfdoc.h"
#include "dvipdfmx/pdfdev.h"
#include "dvipdfmx/pdfdraw.h"
#include "dvipdfmx/pdffont.h"
#include "dvipdfmx/pdfximage.h"
#include "dvipdfmx/tfm.h"

Go to the source code of this file.

Defines

#define OPT_TPIC_TRANSPARENT_FILL   (1 << 1)
#define OPT_CIDFONT_FIXEDPITCH   (1 << 2)
#define OPT_FONTMAP_FIRST_MATCH   (1 << 3)
#define OPT_PDFDOC_NO_DEST_REMOVE   (1 << 4)

Functions

void error_cleanup (void)
static double font_size (string name)
static void make_transmatrix (pdf_tmatrix *M, double xoffset, double yoffset, double xscale, double yscale, double rotate)
renderer pdf_renderer (url pdf_file_name, int dpi, int nr_pages, string page_type, bool landscape, double paper_w, double paper_h)

Variables

static double annot_grow = 0.0
static int bookmark_open = 0
static int font_dpi = 600
static long opt_flags = 0
static int do_encryption = 0
static double dvi2pts = 1.0
static int pdfdecimaldigits = 2
static char ignore_colors = 0

Define Documentation

#define OPT_CIDFONT_FIXEDPITCH   (1 << 2)

Definition at line 69 of file pdf_renderer.cpp.

#define OPT_FONTMAP_FIRST_MATCH   (1 << 3)

Definition at line 70 of file pdf_renderer.cpp.

#define OPT_PDFDOC_NO_DEST_REMOVE   (1 << 4)

Definition at line 71 of file pdf_renderer.cpp.

#define OPT_TPIC_TRANSPARENT_FILL   (1 << 1)

Definition at line 68 of file pdf_renderer.cpp.


Function Documentation

void error_cleanup ( void  )

Definition at line 43 of file pdf_renderer.cpp.

  {
    pdf_close_images();  /* delete temporary files */
    pdf_error_cleanup();
#if 0
    if (pdf_filename) {
      remove(pdf_filename);
      fprintf(stderr, "\nOutput file removed.\n");
    }
#endif
  }

Here is the call graph for this function:

Here is the caller graph for this function:

static double font_size ( string  name) [static]

Definition at line 290 of file pdf_renderer.cpp.

                                      {
  int pos= search_forwards (".", name);
  int szpos= pos-1;
  while ((szpos>0) && is_numeric (name[szpos-1])) szpos--;
  double size= as_double (name (szpos, pos));
  if (size == 0) size= 10;
  return size;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void make_transmatrix ( pdf_tmatrix M,
double  xoffset,
double  yoffset,
double  xscale,
double  yscale,
double  rotate 
) [static]

Definition at line 496 of file pdf_renderer.cpp.

{
  double c, s;
  
  c = cos(rotate);
  s = sin(rotate);
  
  M->a =  xscale * c; M->b = xscale * s;
  M->c = -yscale * s; M->d = yscale * c;
  M->e = xoffset;     M->f = yoffset;
}

Here is the call graph for this function:

Here is the caller graph for this function:

renderer pdf_renderer ( url  pdf_file_name,
int  dpi,
int  nr_pages,
string  page_type,
bool  landscape,
double  paper_w,
double  paper_h 
)

Definition at line 608 of file pdf_renderer.cpp.

{
  return tm_new<pdf_renderer_rep> (pdf_file_name, dpi, nr_pages,
                       page_type, landscape, paper_w, paper_h);
}

Here is the caller graph for this function:


Variable Documentation

double annot_grow = 0.0 [static]

Definition at line 60 of file pdf_renderer.cpp.

int bookmark_open = 0 [static]

Definition at line 61 of file pdf_renderer.cpp.

int do_encryption = 0 [static]

Definition at line 73 of file pdf_renderer.cpp.

double dvi2pts = 1.0 [static]

Definition at line 76 of file pdf_renderer.cpp.

int font_dpi = 600 [static]

Definition at line 62 of file pdf_renderer.cpp.

char ignore_colors = 0 [static]

Definition at line 83 of file pdf_renderer.cpp.

long opt_flags = 0 [static]

Definition at line 64 of file pdf_renderer.cpp.

int pdfdecimaldigits = 2 [static]

Definition at line 82 of file pdf_renderer.cpp.