Main Page | File List | File Members

runpdftex -- a wrapper to run pdftex via a library call.

Introduction

runpdftex is a wrapper to run pdftex via a library call. The main purpose of this wrapper is to help developers to convert TeX documents to PDF using pdftex via a well-defined API. This way, TeX-specific issues can be (partly) hidden.

API

The API of runpdftex is documented in runpdftex.h

Example

A minimal example how runpdftex can be used is here:
#include <stdlib.h>
#include <stdio.h>
#include "runpdftex.h"

int main()
{
    rpt_status_t r;

    rpt_data *data = rpt_create();
    rpt_set_tex_file(data, "/home/thanh/runpdftex/good-file.tex");
    rpt_set_working_dir(data, "/home/thanh/runpdftex/tmp");
    rpt_add_option(data, "-fmt=pdflatex");
    rpt_run(data);
    r = rpt_get_status(data);
    if (r == RPT_STATUS_OK)
        puts("OK");
    else {
        fputs(rpt_get_status_str(data), stderr);
        fputs("\n", stderr);
    }
    rpt_destroy(data);

    return (r == RPT_STATUS_OK) ? EXIT_SUCCESS : EXIT_FAILURE;
}

Generated on Mon Feb 26 13:45:24 2007 for runpdftex by  doxygen 1.4.2