#ifndef __PDFIUM_H__ #define __PDFIUM_H__ #include <stdlib.h> #include <inttypes.h> #include <fpdf_dataavail.h> #include <fpdf_ext.h> #include <fpdfformfill.h> #include <fpdftext.h> #include <fpdfview.h> #include <fpdfedit.h> #include <fpdfsave.h> #include <fpdfdoc.h> #include <iostream> #include <fpdfdoc/fpdf_doc.h> #include <fpdfapi/fpdf_render.h> #include <fpdfapi/fpdf_pageobj.h> #include <fpdfsdk/include/fsdk_rendercontext.h> #include <FreeImage.h> #include "page_wrapper.h" #include "page_object_wrapper.h" #include "document_wrapper.h" // auto generated by mkmf #include "extconf.h" extern "C" { #include "ruby.h" } #ifdef DEBUG #define DEBUG_MSG(str) do { std::cout << str << std::endl; } while( false ) #else #define DEBUG_MSG(str) do { } while ( false ) #endif VALUE define_bookmark_class(); VALUE define_document_class(); VALUE define_page_class(); VALUE define_image_class(); // a utility method to extract the reference to the FPDF_DOCUMENT from the Ruby/C++ wrapping CPDF_Page* RB2PG(VALUE RB_Page); CPDF_Document* RB2DOC(VALUE RB_DocumentWrapper); CPDF_ImageObject* RB2IMG(VALUE RB_Image); const char* PDFiumLastErrorString(); class RB { public: static VALUE PDFium(); static VALUE Bookmark(); static VALUE Document(); static VALUE Page(); static VALUE BookmarkList(); static VALUE BoundingBox(); static VALUE StringIO(); static VALUE Image(); static VALUE PageList(); static VALUE ImageList(); static VALUE type(VALUE object); static VALUE to_string(const CFX_WideString &widestring); static ID to_s(VALUE object); static VALUE get_option(VALUE hash, const std::string &key); }; #endif // __PDFIUM_H__