X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2FSWFOutputDev.h;h=e12930bfeffd7a9e26e377bfe57818fc85aaade9;hb=bcc4020a983e4f2cdaa13e2b0bc110a775fa5b0e;hp=e110d4a5eaf449ee2e21afb3a025462a61f686a7;hpb=8fd13edea1571f100db08fc5c19d08808a6ead1b;p=swftools.git diff --git a/pdf2swf/SWFOutputDev.h b/pdf2swf/SWFOutputDev.h index e110d4a..e12930b 100644 --- a/pdf2swf/SWFOutputDev.h +++ b/pdf2swf/SWFOutputDev.h @@ -4,24 +4,84 @@ Part of the swftools package. Copyright (c) 2001 Matthias Kramm + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This file is distributed under the GPL, see file COPYING for details */ + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __pdf_h__ #define __pdf_h__ -void pdfswf_init(char*filename, char*userPassword) ; -void pdfswf_setoutputfilename(char*filename); -void pdfswf_drawonlyshapes(); -void pdfswf_enablezlib(); -void pdfswf_ignoredraworder(); -void pdfswf_linksopennewwindow(); -void pdfswf_jpegquality(int); -void pdfswf_performconversion(); -void pdfswf_storeallcharacters(); -void pdfswf_insertstop(); -void pdfswf_setversion(int); - -int pdfswf_numpages(); -void pdfswf_convertpage(int page) ; -void pdfswf_close(); +#ifdef __cplusplus +extern "C" { +#endif + +void pdfswf_addfont(char*filename); +void pdfswf_addfontdir(char*dir); +void pdfswf_addlanguagedir(char*dir); + +void pdfswf_setparameter(char*name, char*value); + +typedef struct _pdf_doc +{ + char*info; + char*title; + int num_pages; + void*internal; +} pdf_doc_t; + +pdf_doc_t* pdf_init(char*filename, char*userPassword); +void pdf_destroy(pdf_doc_t*doc); + +typedef struct _swf_output +{ + int num_pages; + void*internal; +} swf_output_t; + +swf_output_t* swf_output_init(); +void swf_output_startframe(swf_output_t*, int width, int height); +void swf_output_endframe(swf_output_t*); +void swf_output_setparameter(swf_output_t*, char*name, char*value); +int swf_output_save(swf_output_t*, char*filename); +void* swf_output_get(swf_output_t*, char*name); +void swf_output_preparepage(swf_output_t*, int pdfpage, int outputpage); +void swf_output_destroy(swf_output_t*page); + +typedef struct _pdf_page +{ + pdf_doc_t*parent; + int nr; + void*internal; +} pdf_page_t; + +pdf_page_t* pdf_getpage(pdf_doc_t*doc, int page); +void pdf_page_render(pdf_page_t*page, swf_output_t*output); +void pdf_page_rendersection(pdf_page_t*page, swf_output_t*output, int x, int y, int x1, int y1, int x2, int y2); +void pdf_page_destroy(pdf_page_t*page); + +typedef struct _pdf_page_info +{ + int xMin, yMin, xMax, yMax; + int number_of_images; + int number_of_links; + int number_of_fonts; +} pdf_page_info_t; + +pdf_page_info_t* pdf_page_getinfo(pdf_page_t*page); +void pdf_page_info_destroy(pdf_page_info_t*info); + +#ifdef __cplusplus +} +#endif + #endif //__pdf_h__