2012-10-16 02:02:38 +00:00
|
|
|
/*
|
|
|
|
** k2pdfopt.h K2pdfopt optimizes PDF/DJVU files for mobile e-readers
|
|
|
|
** (e.g. the Kindle) and smartphones. It works well on
|
|
|
|
** multi-column PDF/DJVU files. K2pdfopt is freeware.
|
|
|
|
**
|
|
|
|
** Copyright (C) 2012 http://willus.com
|
|
|
|
**
|
|
|
|
** This program is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU Affero General Public License as
|
|
|
|
** published by the Free Software Foundation, either version 3 of the
|
|
|
|
** License, or (at your option) any later version.
|
|
|
|
**
|
|
|
|
** 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 Affero General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU Affero General Public License
|
|
|
|
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _K2PDFOPT_H
|
|
|
|
#define _K2PDFOPT_H
|
|
|
|
|
|
|
|
#include <fitz/fitz-internal.h>
|
2012-10-18 17:20:48 +00:00
|
|
|
#include <libdjvu/ddjvuapi.h>
|
2012-10-16 02:02:38 +00:00
|
|
|
|
2012-10-27 06:24:27 +00:00
|
|
|
void k2pdfopt_set_params(int bb_width, int bb_height, \
|
|
|
|
double font_size, double page_margin, \
|
2012-10-26 09:16:31 +00:00
|
|
|
double line_space, double word_space, \
|
2012-10-27 08:03:49 +00:00
|
|
|
int wrapping, int straighten, int justification, \
|
2012-10-27 06:55:50 +00:00
|
|
|
int columns, double contrast);
|
2012-10-27 06:24:27 +00:00
|
|
|
void k2pdfopt_mupdf_reflow(fz_document *doc, fz_page *page, fz_context *ctx);
|
|
|
|
void k2pdfopt_djvu_reflow(ddjvu_page_t *page, ddjvu_context_t *ctx, ddjvu_render_mode_t mode, ddjvu_format_t *fmt);
|
2012-10-18 17:20:48 +00:00
|
|
|
void k2pdfopt_rfbmp_size(int *width, int *height);
|
|
|
|
void k2pdfopt_rfbmp_ptr(unsigned char** bmp_ptr_ptr);
|
2012-10-24 14:01:36 +00:00
|
|
|
void k2pdfopt_rfbmp_zoom(double *zoom);
|
2012-10-16 02:02:38 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|