Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
#include <node.h>
#include <v8.h>
#ifndef UNIX
#define UNIX
#define UNIX_64
#endif
#include <scctype.h>
#include <sccex.h>
using namespace v8;
Handle<Value> convert (const Arguments& args) {
HandleScope scope;
return scope.Close(Undefined());
}
void initialize (Handle<Object> target) {
VTDWORD loadSettings = OI_INIT_DEFAULT | OI_INIT_NOSAVEOPTIONS | OI_INIT_NOLOADOPTIONS;
// initialize data access module
if (DAInitEx(DATHREAD_INIT_NOTHREADS, loadSettings) != DAERR_OK)
ThrowException(Exception::TypeError(String::New("failed to initialize pdf export engine")));
// export convert function
target->Set(String::NewSymbol("convert"), FunctionTemplate::New(convert)->GetFunction());
}
NODE_MODULE(topdf, initialize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.