Back to index

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

Go to the source code of this file.

Functions

void set_distiller_template (char *s)
pdf_objps_include (char *file_name, struct xform_info *p, char *res_name, double x_user, double y_user)
int check_for_ps (FILE *image_file)
void psimage_close (void)

Function Documentation

int check_for_ps ( FILE image_file)

Definition at line 139 of file psimage.c.

{
  rewind (image_file);
  mfgets (work_buffer, WORK_BUFFER_SIZE, image_file);
  if (!strncmp (work_buffer, "%!", 2))
    return 1;
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

pdf_obj* ps_include ( char *  file_name,
struct xform_info p,
char *  res_name,
double  x_user,
double  y_user 
)

Definition at line 110 of file psimage.c.

{
#ifdef HAVE_SYSTEM
  pdf_obj *result = NULL;
  char *tmp, *cmd;
  FILE *pdf_file = NULL;
  /* Get a full qualified tmp name */
  tmp = tmpnam (NULL);
  if ((cmd = build_command_line (file_name, tmp))) {
    if (!system (cmd) && (pdf_file = MFOPEN (tmp, FOPEN_RBIN_MODE))) {
      result = pdf_include_page (pdf_file, p, res_name);
    } else {
      fprintf (stderr, "\nConversion via ->%s<- failed\n", cmd);
    }
    if (pdf_file) {
      MFCLOSE (pdf_file);
      remove (tmp);
    }
    RELEASE (cmd);
  }
  return result;
#else
  fprintf (stderr, "\n\nCannot include PS/EPS files unless you have and enable system() command.\n");
  return NULL;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 148 of file psimage.c.

Here is the caller graph for this function:

Definition at line 36 of file psimage.c.

{
  distiller_template = NEW (strlen(s)+1, char);
  strcpy (distiller_template, s);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function: