/*
 * FILE : pdflib_pl.c
 * 
 * This file was automatically generated by :
 * Simplified Wrapper and Interface Generator (SWIG)
 * Version 1.2 (alpha 1)
 * 
 * Portions Copyright (c) 1995-1998
 * The University of Utah and The Regents of the University of California.
 * Permission is granted to distribute this file in any manner provided
 * this notice remains intact.
 * 
 * Do not make changes to this file--changes will be lost!
 *
 */


#define SWIGCODE
/* Implementation : PERL 5 */

#define SWIGPERL
#define SWIGPERL5
#ifdef __cplusplus
#include <math.h>
#include <stdlib.h>
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#undef free
#undef malloc
#include <string.h>
#ifdef __cplusplus
}
#endif
/* Definitions for compiling Perl extensions on a variety of machines */

#if defined(WIN32) || defined(__WIN32__)
#   if defined(_MSC_VER)
#	define SWIGEXPORT(a,b) __declspec(dllexport) a b
#   else
#	if defined(__BORLANDC__)
#	    define SWIGEXPORT(a,b) a _export b
#	else
#	    define SWIGEXPORT(a,b) a b
#	endif
#   endif
#else
#   define SWIGEXPORT(a,b) a b
#endif

#ifdef PERL_OBJECT
#define MAGIC_PPERL  CPerl *pPerl = (CPerl *) this;
#define MAGIC_CAST   (int (CPerl::*)(SV *, MAGIC *))
#define SWIGCLASS_STATIC 
#else
#define MAGIC_PPERL
#define MAGIC_CAST
#define SWIGCLASS_STATIC static
#endif


/*****************************************************************************
 * $Header: /usr/local/cvsroot/swig/swig1/swig_lib/perl5/perl5ptr.swg,v 1.1.1.1 1999/01/21 11:16:43 harcoh Exp $
 *
 * perl5ptr.swg
 *
 * This file contains supporting code for the SWIG run-time type checking
 * mechanism.  The following functions are available :
 *
 * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *));
 *
 *      Registers a new type-mapping with the type-checker.  origtype is the
 *      original datatype and newtype is an equivalent type.  cast is optional
 *      pointer to a function to cast pointer values between types (this
 *      is only used to cast pointers from derived classes to base classes in C++)
 *      
 * SWIG_MakePtr(char *buffer, void *ptr, char *typestring);
 *     
 *      Makes a pointer string from a pointer and typestring.  The result is returned
 *      in buffer.
 *
 * char * SWIG_GetPtr(SV *obj, void **ptr, char *type)
 *
 *      Gets a pointer value from a Perl5 scalar value.  If there is a 
 *      type-mismatch, returns a character string to the received type.  
 *      On success, returns NULL.
 *
 *
 * You can remap these functions by making a file called "swigptr.swg" in
 * your the same directory as the interface file you are wrapping.
 *
 * These functions are normally declared static, but this file can be
 * can be used in a multi-module environment by redefining the symbol
 * SWIGSTATIC.
 *
 * $Log: perl5ptr.swg,v $
 * Revision 1.1.1.1  1999/01/21 11:16:43  harcoh
 * import of Swig 1.2a1
 *
 * Revision 1.1  1996/12/26 22:17:29  beazley
 * Initial revision
 *
 *****************************************************************************/

#include <stdlib.h>

#ifdef SWIG_GLOBAL
#ifdef __cplusplus
#define SWIGSTATIC extern "C"
#else
#define SWIGSTATIC
#endif
#endif

#ifndef SWIGSTATIC
#define SWIGSTATIC static
#endif

/* These are internal variables.   Should be static */

typedef struct SwigPtrType {
  char               *name;
  int                 len;
  void               *(*cast)(void *);
  struct SwigPtrType *next;
} SwigPtrType;

/* Pointer cache structure */

typedef struct {
  int                 stat;               /* Status (valid) bit             */
  SwigPtrType        *tp;                 /* Pointer to type structure      */
  char                name[256];          /* Given datatype name            */
  char                mapped[256];        /* Equivalent name                */
} SwigCacheType;

static int SwigPtrMax  = 64;           /* Max entries that can be currently held */
static int SwigPtrN    = 0;            /* Current number of entries              */
static int SwigPtrSort = 0;            /* Status flag indicating sort            */
static SwigPtrType *SwigPtrTable = 0;  /* Table containing pointer equivalences  */
static int SwigStart[256];             /* Table containing starting positions    */

/* Cached values */

#define SWIG_CACHESIZE  8
#define SWIG_CACHEMASK  0x7
static SwigCacheType SwigCache[SWIG_CACHESIZE];  
static int SwigCacheIndex = 0;
static int SwigLastCache = 0;

/* Sort comparison function */
static int swigsort(const void *data1, const void *data2) {
	SwigPtrType *d1 = (SwigPtrType *) data1;
	SwigPtrType *d2 = (SwigPtrType *) data2;
	return strcmp(d1->name,d2->name);
}

/* Binary Search function */
static int swigcmp(const void *key, const void *data) {
  char *k = (char *) key;
  SwigPtrType *d = (SwigPtrType *) data;
  return strncmp(k,d->name,d->len);
}

/* Register a new datatype with the type-checker */

#ifndef PERL_OBJECT
SWIGSTATIC 
void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) {
#else
SWIGSTATIC
#define SWIG_RegisterMapping(a,b,c) _SWIG_RegisterMapping(pPerl, a,b,c)
void _SWIG_RegisterMapping(CPerl *pPerl, char *origtype, char *newtype, void *(*cast)(void *)) {
#endif

  int i;
  SwigPtrType *t = 0, *t1;

  if (!SwigPtrTable) {     
    SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType));
    SwigPtrN = 0;
  }
  if (SwigPtrN >= SwigPtrMax) {
    SwigPtrMax = 2*SwigPtrMax;
    SwigPtrTable = (SwigPtrType *) realloc(SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType));
  }
  for (i = 0; i < SwigPtrN; i++)
    if (strcmp(SwigPtrTable[i].name,origtype) == 0) {
      t = &SwigPtrTable[i];
      break;
    }
  if (!t) {
    t = &SwigPtrTable[SwigPtrN];
    t->name = origtype;
    t->len = strlen(t->name);
    t->cast = 0;
    t->next = 0;
    SwigPtrN++;
  }
  while (t->next) {
    if (strcmp(t->name,newtype) == 0) {
      if (cast) t->cast = cast;
      return;
    }
    t = t->next;
  }
  t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType));
  t1->name = newtype;
  t1->len = strlen(t1->name);
  t1->cast = cast;
  t1->next = 0;
  t->next = t1;
  SwigPtrSort = 0;
}

/* Make a pointer value string */

SWIGSTATIC 
void SWIG_MakePtr(char *_c, const void *_ptr, char *type) {
  static char _hex[16] =
  {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
   'a', 'b', 'c', 'd', 'e', 'f'};
  unsigned long _p, _s;
  char _result[20], *_r;    /* Note : a 64-bit hex number = 16 digits */
  _r = _result;
  _p = (unsigned long) _ptr;
  if (_p > 0) {
    while (_p > 0) {
      _s = _p & 0xf;
      *(_r++) = _hex[_s];
      _p = _p >> 4;
    }
    *_r = '_';
    while (_r >= _result)
      *(_c++) = *(_r--);
  } else {
    strcpy (_c, "NULL");
  }
  if (_ptr)
    strcpy (_c, type);
}

/* Define for backwards compatibility */

#define _swig_make_hex   SWIG_MakePtr 

/* Function for getting a pointer value */

#ifndef PERL_OBJECT
SWIGSTATIC 
char *SWIG_GetPtr(SV *sv, void **ptr, char *_t)
#else
SWIGSTATIC
#define SWIG_GetPtr(a,b,c) _SWIG_GetPtr(pPerl,a,b,c)
char *_SWIG_GetPtr(CPerl *pPerl, SV *sv, void **ptr, char *_t)
#endif
{
  char temp_type[256];
  char *name,*_c;
  int  len,i,start,end;
  IV   tmp;
  SwigPtrType *sp,*tp;
  SwigCacheType *cache;

  /* If magical, apply more magic */

  if (SvGMAGICAL(sv))
    mg_get(sv);

  /* Check to see if this is an object */
  if (sv_isobject(sv)) {
    SV *tsv = (SV*) SvRV(sv);
    if ((SvTYPE(tsv) == SVt_PVHV)) {
      MAGIC *mg;
      if (SvMAGICAL(tsv)) {
	mg = mg_find(tsv,'P');
	if (mg) {
	  SV *rsv = mg->mg_obj;
	  if (sv_isobject(rsv)) {
	    tmp = SvIV((SV*)SvRV(rsv));
	  }
	}
      } else {
	return "Not a valid pointer value";
      }
    } else {
      tmp = SvIV((SV*)SvRV(sv));
    }
    if (!_t) {
      *(ptr) = (void *) tmp;
      return (char *) 0;
    }
  } else if (sv == &sv_undef) {            /* Check for undef */
    *(ptr) = (void *) 0;
    return (char *) 0;
  } else if (SvTYPE(sv) == SVt_RV) {       /* Check for NULL pointer */
    *(ptr) = (void *) 0;
    if (!SvROK(sv)) 
      return (char *) 0;
    else
      return "Not a valid pointer value";
  } else {                                 /* Don't know what it is */
      *(ptr) = (void *) 0;
      return "Not a valid pointer value";
  }
  if (_t) {
    /* Now see if the types match */      

    if (!sv_isa(sv,_t)) {
      _c = HvNAME(SvSTASH(SvRV(sv)));
      if (!SwigPtrSort) {
	qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort);  
	for (i = 0; i < 256; i++) {
	  SwigStart[i] = SwigPtrN;
	}
	for (i = SwigPtrN-1; i >= 0; i--) {
	  SwigStart[SwigPtrTable[i].name[0]] = i;
	}
	for (i = 255; i >= 1; i--) {
	  if (SwigStart[i-1] > SwigStart[i])
	    SwigStart[i-1] = SwigStart[i];
	}
	SwigPtrSort = 1;
	for (i = 0; i < SWIG_CACHESIZE; i++)  
	  SwigCache[i].stat = 0;
      }
      /* First check cache for matches.  Uses last cache value as starting point */
      cache = &SwigCache[SwigLastCache];
      for (i = 0; i < SWIG_CACHESIZE; i++) {
	if (cache->stat) {
	  if (strcmp(_t,cache->name) == 0) {
	    if (strcmp(_c,cache->mapped) == 0) {
	      cache->stat++;
	      *ptr = (void *) tmp;
	      if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr);
	      return (char *) 0;
	    }
	  }
	}
	SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK;
	if (!SwigLastCache) cache = SwigCache;
	else cache++;
      }

      start = SwigStart[_t[0]];
      end = SwigStart[_t[0]+1];
      sp = &SwigPtrTable[start];
      while (start < end) {
	if (swigcmp(_t,sp) == 0) break;
	sp++;
	start++;
      }
      if (start >= end) sp = 0;
      if (sp) {
	while (swigcmp(_t,sp) == 0) {
	  name = sp->name;
	  len = sp->len;
	  tp = sp->next;
	  while(tp) {
	    if (tp->len >= 255) {
	      return _c;
	    }
	    strcpy(temp_type,tp->name);
	    strncat(temp_type,_t+len,255-tp->len);
	    if (sv_isa(sv,temp_type)) {
	      /* Get pointer value */
	      *ptr = (void *) tmp;
	      if (tp->cast) *ptr = (*(tp->cast))(*ptr);

	      strcpy(SwigCache[SwigCacheIndex].mapped,_c);
	      strcpy(SwigCache[SwigCacheIndex].name,_t);
	      SwigCache[SwigCacheIndex].stat = 1;
	      SwigCache[SwigCacheIndex].tp = tp;
	      SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK;
	      return (char *) 0;
	    }
	    tp = tp->next;
	  } 
	  /* Hmmm. Didn't find it this time */
 	  sp++;
	}
      }
      /* Didn't find any sort of match for this data.  
	 Get the pointer value and return the received type */
      *ptr = (void *) tmp;
      return _c;
    } else {
      /* Found a match on the first try.  Return pointer value */
      *ptr = (void *) tmp;
      return (char *) 0;
    }
  } 
  *ptr = (void *) tmp;
  return (char *) 0;
}

/* Compatibility mode */

#define _swig_get_hex  SWIG_GetPtr
/* Magic variable code */
#ifndef PERL_OBJECT
#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
static void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) {
#else
#define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
static void _swig_create_magic(CPerl *pPerl, SV *sv, char *name, int (CPerl::*set)(SV *, MAGIC *), int (CPerl::*get)(SV *, MAGIC *)) {
#endif
  MAGIC *mg;
  sv_magic(sv,sv,'U',name,strlen(name));
  mg = mg_find(sv,'U');
  mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
  mg->mg_virtual->svt_get = get;
  mg->mg_virtual->svt_set = set;
  mg->mg_virtual->svt_len = 0;
  mg->mg_virtual->svt_clear = 0;
  mg->mg_virtual->svt_free = 0;
}

#define SWIG_init    boot_pdflib

#define SWIG_name   "pdflibc::boot_pdflib"
#define SWIG_varinit "pdflibc::var_pdflib_init();"
#ifdef __cplusplus
extern "C"
#endif
#ifndef PERL_OBJECT
SWIGEXPORT(void,boot_pdflib)(CV* cv);
#else
SWIGEXPORT(void,boot_pdflib)(CV *cv, CPerlObj *pPerl);
#endif

#define  SWIG_MemoryError    1
#define  SWIG_IOError        2
#define  SWIG_RuntimeError   3
#define  SWIG_IndexError     4
#define  SWIG_TypeError      5
#define  SWIG_DivisionByZero 6
#define  SWIG_OverflowError  7
#define  SWIG_SyntaxError    8
#define  SWIG_ValueError     9
#define  SWIG_SystemError   10
#define  SWIG_UnknownError  99

#define SWIG_exception(a,b)   croak(b)

#include <setjmp.h>

/* The following sick stuff is an attempt to make recent Perl versions
 * work with recent SWIG versions compiled with recent MS VC++ versions.
 */
#ifdef _MSC_VER
    #undef setjmp
    #define setjmp _setjmp
    #undef longjmp
#endif

#include "pdflib.h"

/* Map PDFlib errors to SWIG exceptions */
static const int pdf_swig_exceptions[] = {
    0,
    SWIG_MemoryError,	/* PDF_MemoryError    1 */
    SWIG_IOError,	/* PDF_IOError        2 */
    SWIG_RuntimeError,	/* PDF_RuntimeError   3 */
    SWIG_IndexError,	/* PDF_IndexError     4 */
    SWIG_TypeError,	/* PDF_TypeError      5 */
    SWIG_DivisionByZero,/* PDF_DivisionByZero 6 */
    SWIG_OverflowError,	/* PDF_OverflowError  7 */
    SWIG_SyntaxError,	/* PDF_SyntaxError    8 */
    SWIG_ValueError,	/* PDF_ValueError     9 */
    SWIG_SystemError,	/* PDF_SystemError   10 */
    SWIG_UnknownError,	/* PDF_NonfatalError 11 */ /* PDFlib-special */
    SWIG_UnknownError,	/* PDF_UnknownError  12 */
};

/* SWIG exception handling is currently not thread-safe! */
static jmp_buf		exception_buffer;
static int		exception_status;
static char		error_message[256];

/* Exception handling for SWIG. Note that these are not used for the C API */
#define try		if ((exception_status = setjmp(exception_buffer)) == 0)
#define catch(error)	else if (exception_status == error)
#define throw(error)	longjmp(exception_buffer, error)
#define finally		else

/* PDFlib error handler for the SWIG libraries */

static void
pdf_swig_errorhandler(PDF *p, int type, const char* shortmsg)
{
    sprintf(error_message, "PDFlib: %s\n", shortmsg);

    /* Issue a warning message and continue for non-fatal errors */
    if (type == PDF_NonfatalError) {
	fprintf(stderr, error_message);
	return;
    }
	
    /* Clean up PDFlib internals and delete p in all other cases */
    if (p != NULL)
	PDF_delete(p);

    /* ...and throw an exception */
    throw(type);
}

/* Force the SWIG error handler for all clients */
#define PDF_new() PDF_new2(pdf_swig_errorhandler, NULL, NULL, NULL, NULL)

/* export the PDFlib routines to the shared library */
#ifdef __MWERKS__
#pragma export on
#endif

#ifdef PERL_OBJECT
#define MAGIC_CLASS _wrap_pdflib_var::
class _wrap_pdflib_var : public CPerl {
public:
#else
#define MAGIC_CLASS
#endif
SWIGCLASS_STATIC int swig_magic_readonly(SV *sv, MAGIC *mg) {
    MAGIC_PPERL
    sv = sv; mg = mg;
    croak("Value is read-only.");
    return 0;
}


#ifdef PERL_OBJECT
};
#endif

XS(_wrap_PDF_boot) {

    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 0) || (items > 0)) 
        croak("Usage: PDF_boot();");
{
    try {     PDF_boot();
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_shutdown) {

    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 0) || (items > 0)) 
        croak("Usage: PDF_shutdown();");
{
    try {     PDF_shutdown();
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_new) {

    PDF * _result;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 0) || (items > 0)) 
        croak("Usage: PDF_new();");
{
    try {     _result = (PDF *)PDF_new();
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setref_pv(ST(argvi++),"PDFPtr", (void *) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_delete) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_delete(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_delete. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_delete(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_open_file) {

    int  _result;
    PDF * _arg0;
    char * _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_open_file(p,filename);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_open_file. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
{
    try {     _result = (int )PDF_open_file(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_close) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_close(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_close. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_close(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_begin_page) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_begin_page(p,width,height);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_begin_page. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_begin_page(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_end_page) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_end_page(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_end_page. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_end_page(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_parameter) {

    PDF * _arg0;
    char * _arg1;
    char * _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_set_parameter(p,key,value);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_parameter. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (char *) SvPV(ST(2),na);
{
    try {     PDF_set_parameter(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_findfont) {

    int  _result;
    PDF * _arg0;
    char * _arg1;
    char * _arg2;
    int  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_findfont(p,fontname,encoding,embed);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_findfont. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (char *) SvPV(ST(2),na);
    _arg3 = (int )SvIV(ST(3));
{
    try {     _result = (int )PDF_findfont(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_setfont) {

    PDF * _arg0;
    int  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_setfont(p,font,fontsize);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setfont. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (int )SvIV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_setfont(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_font) {

    PDF * _arg0;
    char * _arg1;
    float  _arg2;
    char * _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_set_font(p,fontname,fontsize,encoding);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_font. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (char *) SvPV(ST(3),na);
{
    try {     PDF_set_font(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_get_fontname) {

    char * _result;
    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_get_fontname(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_get_fontname. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     _result = (char *)PDF_get_fontname(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setpv((SV*)ST(argvi++),(char *) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_get_fontsize) {

    float  _result;
    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_get_fontsize(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_get_fontsize. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     _result = (float )PDF_get_fontsize(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setnv(ST(argvi++), (double) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_get_font) {

    int  _result;
    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_get_font(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_get_font. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     _result = (int )PDF_get_font(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_show) {

    PDF * _arg0;
    char * _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_show(p,text);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_show. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
{
    try {     PDF_show(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_show_xy) {

    PDF * _arg0;
    char * _arg1;
    float  _arg2;
    float  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_show_xy(p,text,x,y);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_show_xy. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
{
    try {     PDF_show_xy(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_continue_text) {

    PDF * _arg0;
    char * _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_continue_text(p,text);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_continue_text. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
{
    try {     PDF_continue_text(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_leading) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_leading(p,leading);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_leading. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_set_leading(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_text_rise) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_text_rise(p,rise);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_text_rise. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_set_text_rise(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_horiz_scaling) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_horiz_scaling(p,scale);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_horiz_scaling. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_set_horiz_scaling(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_text_rendering) {

    PDF * _arg0;
    int  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_text_rendering(p,mode);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_text_rendering. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (int )SvIV(ST(1));
{
    try {     PDF_set_text_rendering(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_text_matrix) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    float  _arg5;
    float  _arg6;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 7) || (items > 7)) 
        croak("Usage: PDF_set_text_matrix(p,a,b,c,d,e,f);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_text_matrix. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (float ) SvNV(ST(5));
    _arg6 = (float ) SvNV(ST(6));
{
    try {     PDF_set_text_matrix(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_text_pos) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_set_text_pos(p,x,y);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_text_pos. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_set_text_pos(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_char_spacing) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_char_spacing(p,spacing);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_char_spacing. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_set_char_spacing(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_word_spacing) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_word_spacing(p,spacing);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_word_spacing. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_set_word_spacing(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_stringwidth) {

    float  _result;
    PDF * _arg0;
    char * _arg1;
    int  _arg2;
    float  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_stringwidth(p,text,font,size);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_stringwidth. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (int )SvIV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
{
    try {     _result = (float )PDF_stringwidth(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setnv(ST(argvi++), (double) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_setdash) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_setdash(p,b,w);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setdash. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_setdash(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setpolydash) {

    PDF * _arg0;
    float * _arg1;
    int  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_setpolydash(p,darray,length);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setpolydash. Expected PDFPtr.");
        XSRETURN(1);
    }
    if (SWIG_GetPtr(ST(1),(void **) &_arg1,"floatPtr")) {
        croak("Type error in argument 2 of PDF_setpolydash. Expected floatPtr.");
        XSRETURN(1);
    }
    _arg2 = (int )SvIV(ST(2));
{
    try {     PDF_setpolydash(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setflat) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_setflat(p,flatness);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setflat. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_setflat(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setlinejoin) {

    PDF * _arg0;
    int  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_setlinejoin(p,linejoin);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setlinejoin. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (int )SvIV(ST(1));
{
    try {     PDF_setlinejoin(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setlinecap) {

    PDF * _arg0;
    int  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_setlinecap(p,linecap);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setlinecap. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (int )SvIV(ST(1));
{
    try {     PDF_setlinecap(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setmiterlimit) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_setmiterlimit(p,miter);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setmiterlimit. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_setmiterlimit(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setlinewidth) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_setlinewidth(p,width);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setlinewidth. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_setlinewidth(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_fillrule) {

    PDF * _arg0;
    char * _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_fillrule(p,fillrule);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_fillrule. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
{
    try {     PDF_set_fillrule(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_save) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_save(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_save. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_save(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_restore) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_restore(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_restore. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_restore(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_translate) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_translate(p,tx,ty);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_translate. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_translate(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_scale) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_scale(p,sx,sy);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_scale. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_scale(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_rotate) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_rotate(p,phi);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_rotate. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_rotate(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_moveto) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_moveto(p,x,y);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_moveto. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_moveto(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_lineto) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_lineto(p,x,y);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_lineto. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_lineto(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_curveto) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    float  _arg5;
    float  _arg6;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 7) || (items > 7)) 
        croak("Usage: PDF_curveto(p,x1,y1,x2,y2,x3,y3);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_curveto. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (float ) SvNV(ST(5));
    _arg6 = (float ) SvNV(ST(6));
{
    try {     PDF_curveto(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_circle) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_circle(p,x,y,r);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_circle. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
{
    try {     PDF_circle(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_arc) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    float  _arg5;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 6) || (items > 6)) 
        croak("Usage: PDF_arc(p,x,y,r,alpha1,alpha2);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_arc. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (float ) SvNV(ST(5));
{
    try {     PDF_arc(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_rect) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 5) || (items > 5)) 
        croak("Usage: PDF_rect(p,x,y,width,height);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_rect. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
{
    try {     PDF_rect(_arg0,_arg1,_arg2,_arg3,_arg4);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_closepath) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_closepath(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_closepath. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_closepath(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_stroke) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_stroke(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_stroke. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_stroke(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_closepath_stroke) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_closepath_stroke(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_closepath_stroke. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_closepath_stroke(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_fill) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_fill(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_fill. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_fill(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_fill_stroke) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_fill_stroke(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_fill_stroke. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_fill_stroke(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_closepath_fill_stroke) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_closepath_fill_stroke(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_closepath_fill_stroke. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_closepath_fill_stroke(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_endpath) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_endpath(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_endpath. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_endpath(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_clip) {

    PDF * _arg0;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 1) || (items > 1)) 
        croak("Usage: PDF_clip(p);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_clip. Expected PDFPtr.");
        XSRETURN(1);
    }
{
    try {     PDF_clip(_arg0);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setgray_fill) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_setgray_fill(p,g);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setgray_fill. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_setgray_fill(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setgray_stroke) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_setgray_stroke(p,g);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setgray_stroke. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_setgray_stroke(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setgray) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_setgray(p,g);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setgray. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_setgray(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setrgbcolor_fill) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_setrgbcolor_fill(p,red,green,blue);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setrgbcolor_fill. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
{
    try {     PDF_setrgbcolor_fill(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setrgbcolor_stroke) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_setrgbcolor_stroke(p,red,green,blue);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setrgbcolor_stroke. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
{
    try {     PDF_setrgbcolor_stroke(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_setrgbcolor) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_setrgbcolor(p,red,green,blue);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_setrgbcolor. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
{
    try {     PDF_setrgbcolor(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_get_image_width) {

    int  _result;
    PDF * _arg0;
    int  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_get_image_width(p,image);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_get_image_width. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (int )SvIV(ST(1));
{
    try {     _result = (int )PDF_get_image_width(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_get_image_height) {

    int  _result;
    PDF * _arg0;
    int  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_get_image_height(p,image);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_get_image_height. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (int )SvIV(ST(1));
{
    try {     _result = (int )PDF_get_image_height(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_place_image) {

    PDF * _arg0;
    int  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 5) || (items > 5)) 
        croak("Usage: PDF_place_image(p,image,x,y,scale);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_place_image. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (int )SvIV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
{
    try {     PDF_place_image(_arg0,_arg1,_arg2,_arg3,_arg4);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_open_image) {

    int  _result;
    PDF * _arg0;
    char * _arg1;
    char * _arg2;
    char * _arg3;
    long  _arg4;
    int  _arg5;
    int  _arg6;
    int  _arg7;
    int  _arg8;
    char * _arg9;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 10) || (items > 10)) 
        croak("Usage: PDF_open_image(p,type,source,data,length,width,height,components,bpc,params);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_open_image. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (char *) SvPV(ST(2),na);
    _arg3 = (char *) SvPV(ST(3),na);
    _arg4 = (long )SvIV(ST(4));
    _arg5 = (int )SvIV(ST(5));
    _arg6 = (int )SvIV(ST(6));
    _arg7 = (int )SvIV(ST(7));
    _arg8 = (int )SvIV(ST(8));
    _arg9 = (char *) SvPV(ST(9),na);
{
    try {     _result = (int )PDF_open_image(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_close_image) {

    PDF * _arg0;
    int  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_close_image(p,image);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_close_image. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (int )SvIV(ST(1));
{
    try {     PDF_close_image(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_open_JPEG) {

    int  _result;
    PDF * _arg0;
    char * _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_open_JPEG(p,filename);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_open_JPEG. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
{
    try {     _result = (int )PDF_open_JPEG(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_open_TIFF) {

    int  _result;
    PDF * _arg0;
    char * _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_open_TIFF(p,filename);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_open_TIFF. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
{
    try {     _result = (int )PDF_open_TIFF(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_open_GIF) {

    int  _result;
    PDF * _arg0;
    char * _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_open_GIF(p,filename);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_open_GIF. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
{
    try {     _result = (int )PDF_open_GIF(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_open_CCITT) {

    int  _result;
    PDF * _arg0;
    char * _arg1;
    int  _arg2;
    int  _arg3;
    int  _arg4;
    int  _arg5;
    int  _arg6;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 7) || (items > 7)) 
        croak("Usage: PDF_open_CCITT(p,filename,width,height,BitReverse,K,BlackIs1);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_open_CCITT. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (int )SvIV(ST(2));
    _arg3 = (int )SvIV(ST(3));
    _arg4 = (int )SvIV(ST(4));
    _arg5 = (int )SvIV(ST(5));
    _arg6 = (int )SvIV(ST(6));
{
    try {     _result = (int )PDF_open_CCITT(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_add_bookmark) {

    int  _result;
    PDF * _arg0;
    char * _arg1;
    int  _arg2;
    int  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_add_bookmark(p,text,parent,open);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_add_bookmark. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (int )SvIV(ST(2));
    _arg3 = (int )SvIV(ST(3));
{
    try {     _result = (int )PDF_add_bookmark(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    ST(argvi) = sv_newmortal();
    sv_setiv(ST(argvi++),(IV) _result);
    XSRETURN(argvi);
}

XS(_wrap_PDF_set_info) {

    PDF * _arg0;
    char * _arg1;
    char * _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_set_info(p,key,value);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_info. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (char *) SvPV(ST(2),na);
{
    try {     PDF_set_info(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_transition) {

    PDF * _arg0;
    char * _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_transition(p,type);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_transition. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
{
    try {     PDF_set_transition(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_duration) {

    PDF * _arg0;
    float  _arg1;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 2) || (items > 2)) 
        croak("Usage: PDF_set_duration(p,t);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_duration. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
{
    try {     PDF_set_duration(_arg0,_arg1);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_attach_file) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    char * _arg5;
    char * _arg6;
    char * _arg7;
    char * _arg8;
    char * _arg9;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 10) || (items > 10)) 
        croak("Usage: PDF_attach_file(p,llx,lly,urx,ury,filename,description,author,mimetype,icon);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_attach_file. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (char *) SvPV(ST(5),na);
    _arg6 = (char *) SvPV(ST(6),na);
    _arg7 = (char *) SvPV(ST(7),na);
    _arg8 = (char *) SvPV(ST(8),na);
    _arg9 = (char *) SvPV(ST(9),na);
{
    try {     PDF_attach_file(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_add_note) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    char * _arg5;
    char * _arg6;
    char * _arg7;
    int  _arg8;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 9) || (items > 9)) 
        croak("Usage: PDF_add_note(p,llx,lly,urx,ury,contents,title,icon,open);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_add_note. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (char *) SvPV(ST(5),na);
    _arg6 = (char *) SvPV(ST(6),na);
    _arg7 = (char *) SvPV(ST(7),na);
    _arg8 = (int )SvIV(ST(8));
{
    try {     PDF_add_note(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_add_pdflink) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    char * _arg5;
    int  _arg6;
    char * _arg7;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 8) || (items > 8)) 
        croak("Usage: PDF_add_pdflink(p,llx,lly,urx,ury,filename,page,dest);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_add_pdflink. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (char *) SvPV(ST(5),na);
    _arg6 = (int )SvIV(ST(6));
    _arg7 = (char *) SvPV(ST(7),na);
{
    try {     PDF_add_pdflink(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_add_launchlink) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    char * _arg5;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 6) || (items > 6)) 
        croak("Usage: PDF_add_launchlink(p,llx,lly,urx,ury,filename);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_add_launchlink. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (char *) SvPV(ST(5),na);
{
    try {     PDF_add_launchlink(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_add_locallink) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    int  _arg5;
    char * _arg6;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 7) || (items > 7)) 
        croak("Usage: PDF_add_locallink(p,llx,lly,urx,ury,page,dest);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_add_locallink. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (int )SvIV(ST(5));
    _arg6 = (char *) SvPV(ST(6),na);
{
    try {     PDF_add_locallink(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_add_weblink) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    float  _arg4;
    char * _arg5;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 6) || (items > 6)) 
        croak("Usage: PDF_add_weblink(p,llx,lly,urx,ury,url);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_add_weblink. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
    _arg4 = (float ) SvNV(ST(4));
    _arg5 = (char *) SvPV(ST(5),na);
{
    try {     PDF_add_weblink(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_border_style) {

    PDF * _arg0;
    char * _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_set_border_style(p,style,width);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_border_style. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (char *) SvPV(ST(1),na);
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_set_border_style(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_border_color) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    float  _arg3;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 4) || (items > 4)) 
        croak("Usage: PDF_set_border_color(p,red,green,blue);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_border_color. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
    _arg3 = (float ) SvNV(ST(3));
{
    try {     PDF_set_border_color(_arg0,_arg1,_arg2,_arg3);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_PDF_set_border_dash) {

    PDF * _arg0;
    float  _arg1;
    float  _arg2;
    int argvi = 0;
    dXSARGS ;

    cv = cv;
    if ((items < 3) || (items > 3)) 
        croak("Usage: PDF_set_border_dash(p,w,b);");
    if (SWIG_GetPtr(ST(0),(void **) &_arg0,"PDFPtr")) {
        croak("Type error in argument 1 of PDF_set_border_dash. Expected PDFPtr.");
        XSRETURN(1);
    }
    _arg1 = (float ) SvNV(ST(1));
    _arg2 = (float ) SvNV(ST(2));
{
    try {     PDF_set_border_dash(_arg0,_arg1,_arg2);
 }
    else {
	SWIG_exception(pdf_swig_exceptions[exception_status], error_message);
    }
}    XSRETURN(argvi);
}

XS(_wrap_perl5_pdflib_var_init) {
    dXSARGS;
    SV *sv;
    cv = cv; items = items;
    XSRETURN(1);
}
#ifdef __cplusplus
extern "C"
#endif
XS(boot_pdflib) {
	 dXSARGS;
	 char *file = __FILE__;
	 cv = cv; items = items;
	 newXS("pdflibc::var_pdflib_init", _wrap_perl5_pdflib_var_init, file);

	/* Boot the PDFlib core */
	PDF_boot();
	 newXS("pdflibc::PDF_boot", _wrap_PDF_boot, file);
	 newXS("pdflibc::PDF_shutdown", _wrap_PDF_shutdown, file);
	 newXS("pdflibc::PDF_new", _wrap_PDF_new, file);
	 newXS("pdflibc::PDF_delete", _wrap_PDF_delete, file);
	 newXS("pdflibc::PDF_open_file", _wrap_PDF_open_file, file);
	 newXS("pdflibc::PDF_close", _wrap_PDF_close, file);
	 newXS("pdflibc::PDF_begin_page", _wrap_PDF_begin_page, file);
	 newXS("pdflibc::PDF_end_page", _wrap_PDF_end_page, file);
	 newXS("pdflibc::PDF_set_parameter", _wrap_PDF_set_parameter, file);
	 newXS("pdflibc::PDF_findfont", _wrap_PDF_findfont, file);
	 newXS("pdflibc::PDF_setfont", _wrap_PDF_setfont, file);
	 newXS("pdflibc::PDF_set_font", _wrap_PDF_set_font, file);
	 newXS("pdflibc::PDF_get_fontname", _wrap_PDF_get_fontname, file);
	 newXS("pdflibc::PDF_get_fontsize", _wrap_PDF_get_fontsize, file);
	 newXS("pdflibc::PDF_get_font", _wrap_PDF_get_font, file);
	 newXS("pdflibc::PDF_show", _wrap_PDF_show, file);
	 newXS("pdflibc::PDF_show_xy", _wrap_PDF_show_xy, file);
	 newXS("pdflibc::PDF_continue_text", _wrap_PDF_continue_text, file);
	 newXS("pdflibc::PDF_set_leading", _wrap_PDF_set_leading, file);
	 newXS("pdflibc::PDF_set_text_rise", _wrap_PDF_set_text_rise, file);
	 newXS("pdflibc::PDF_set_horiz_scaling", _wrap_PDF_set_horiz_scaling, file);
	 newXS("pdflibc::PDF_set_text_rendering", _wrap_PDF_set_text_rendering, file);
	 newXS("pdflibc::PDF_set_text_matrix", _wrap_PDF_set_text_matrix, file);
	 newXS("pdflibc::PDF_set_text_pos", _wrap_PDF_set_text_pos, file);
	 newXS("pdflibc::PDF_set_char_spacing", _wrap_PDF_set_char_spacing, file);
	 newXS("pdflibc::PDF_set_word_spacing", _wrap_PDF_set_word_spacing, file);
	 newXS("pdflibc::PDF_stringwidth", _wrap_PDF_stringwidth, file);
	 newXS("pdflibc::PDF_setdash", _wrap_PDF_setdash, file);
	 newXS("pdflibc::PDF_setpolydash", _wrap_PDF_setpolydash, file);
	 newXS("pdflibc::PDF_setflat", _wrap_PDF_setflat, file);
	 newXS("pdflibc::PDF_setlinejoin", _wrap_PDF_setlinejoin, file);
	 newXS("pdflibc::PDF_setlinecap", _wrap_PDF_setlinecap, file);
	 newXS("pdflibc::PDF_setmiterlimit", _wrap_PDF_setmiterlimit, file);
	 newXS("pdflibc::PDF_setlinewidth", _wrap_PDF_setlinewidth, file);
	 newXS("pdflibc::PDF_set_fillrule", _wrap_PDF_set_fillrule, file);
	 newXS("pdflibc::PDF_save", _wrap_PDF_save, file);
	 newXS("pdflibc::PDF_restore", _wrap_PDF_restore, file);
	 newXS("pdflibc::PDF_translate", _wrap_PDF_translate, file);
	 newXS("pdflibc::PDF_scale", _wrap_PDF_scale, file);
	 newXS("pdflibc::PDF_rotate", _wrap_PDF_rotate, file);
	 newXS("pdflibc::PDF_moveto", _wrap_PDF_moveto, file);
	 newXS("pdflibc::PDF_lineto", _wrap_PDF_lineto, file);
	 newXS("pdflibc::PDF_curveto", _wrap_PDF_curveto, file);
	 newXS("pdflibc::PDF_circle", _wrap_PDF_circle, file);
	 newXS("pdflibc::PDF_arc", _wrap_PDF_arc, file);
	 newXS("pdflibc::PDF_rect", _wrap_PDF_rect, file);
	 newXS("pdflibc::PDF_closepath", _wrap_PDF_closepath, file);
	 newXS("pdflibc::PDF_stroke", _wrap_PDF_stroke, file);
	 newXS("pdflibc::PDF_closepath_stroke", _wrap_PDF_closepath_stroke, file);
	 newXS("pdflibc::PDF_fill", _wrap_PDF_fill, file);
	 newXS("pdflibc::PDF_fill_stroke", _wrap_PDF_fill_stroke, file);
	 newXS("pdflibc::PDF_closepath_fill_stroke", _wrap_PDF_closepath_fill_stroke, file);
	 newXS("pdflibc::PDF_endpath", _wrap_PDF_endpath, file);
	 newXS("pdflibc::PDF_clip", _wrap_PDF_clip, file);
	 newXS("pdflibc::PDF_setgray_fill", _wrap_PDF_setgray_fill, file);
	 newXS("pdflibc::PDF_setgray_stroke", _wrap_PDF_setgray_stroke, file);
	 newXS("pdflibc::PDF_setgray", _wrap_PDF_setgray, file);
	 newXS("pdflibc::PDF_setrgbcolor_fill", _wrap_PDF_setrgbcolor_fill, file);
	 newXS("pdflibc::PDF_setrgbcolor_stroke", _wrap_PDF_setrgbcolor_stroke, file);
	 newXS("pdflibc::PDF_setrgbcolor", _wrap_PDF_setrgbcolor, file);
	 newXS("pdflibc::PDF_get_image_width", _wrap_PDF_get_image_width, file);
	 newXS("pdflibc::PDF_get_image_height", _wrap_PDF_get_image_height, file);
	 newXS("pdflibc::PDF_place_image", _wrap_PDF_place_image, file);
	 newXS("pdflibc::PDF_open_image", _wrap_PDF_open_image, file);
	 newXS("pdflibc::PDF_close_image", _wrap_PDF_close_image, file);
	 newXS("pdflibc::PDF_open_JPEG", _wrap_PDF_open_JPEG, file);
	 newXS("pdflibc::PDF_open_TIFF", _wrap_PDF_open_TIFF, file);
	 newXS("pdflibc::PDF_open_GIF", _wrap_PDF_open_GIF, file);
	 newXS("pdflibc::PDF_open_CCITT", _wrap_PDF_open_CCITT, file);
	 newXS("pdflibc::PDF_add_bookmark", _wrap_PDF_add_bookmark, file);
	 newXS("pdflibc::PDF_set_info", _wrap_PDF_set_info, file);
	 newXS("pdflibc::PDF_set_transition", _wrap_PDF_set_transition, file);
	 newXS("pdflibc::PDF_set_duration", _wrap_PDF_set_duration, file);
	 newXS("pdflibc::PDF_attach_file", _wrap_PDF_attach_file, file);
	 newXS("pdflibc::PDF_add_note", _wrap_PDF_add_note, file);
	 newXS("pdflibc::PDF_add_pdflink", _wrap_PDF_add_pdflink, file);
	 newXS("pdflibc::PDF_add_launchlink", _wrap_PDF_add_launchlink, file);
	 newXS("pdflibc::PDF_add_locallink", _wrap_PDF_add_locallink, file);
	 newXS("pdflibc::PDF_add_weblink", _wrap_PDF_add_weblink, file);
	 newXS("pdflibc::PDF_set_border_style", _wrap_PDF_set_border_style, file);
	 newXS("pdflibc::PDF_set_border_color", _wrap_PDF_set_border_color, file);
	 newXS("pdflibc::PDF_set_border_dash", _wrap_PDF_set_border_dash, file);
/*
 * These are the pointer type-equivalency mappings. 
 * (Used by the SWIG pointer type-checker).
 */
	 SWIG_RegisterMapping("unsigned short","short",0);
	 SWIG_RegisterMapping("PDF","struct PDF_s",0);
	 SWIG_RegisterMapping("long","unsigned long",0);
	 SWIG_RegisterMapping("long","signed long",0);
	 SWIG_RegisterMapping("signed short","short",0);
	 SWIG_RegisterMapping("signed int","int",0);
	 SWIG_RegisterMapping("short","unsigned short",0);
	 SWIG_RegisterMapping("short","signed short",0);
	 SWIG_RegisterMapping("unsigned long","long",0);
	 SWIG_RegisterMapping("int","unsigned int",0);
	 SWIG_RegisterMapping("int","signed int",0);
	 SWIG_RegisterMapping("unsigned int","int",0);
	 SWIG_RegisterMapping("struct PDF_s","PDF",0);
	 SWIG_RegisterMapping("signed long","long",0);
	 ST(0) = &sv_yes;
	 XSRETURN(1);
}
