"Fossies" - the Fresh Open Source Software Archive

Member "epstool-3.08/src/cpdfscan.h" (10 Jun 2005, 1719 Bytes) of package /linux/misc/old/ghost/ghostgum/epstool-3.08-os2.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /* Copyright (C) 2002 Ghostgum Software Pty Ltd.  All rights reserved.
    2 
    3   This software is provided AS-IS with no warranty, either express or
    4   implied.
    5 
    6   This software is distributed under licence and may not be copied,
    7   modified or distributed except as expressly authorised under the terms
    8   of the licence contained in the file LICENCE in this distribution.
    9 
   10   For more information about licensing, please refer to
   11   http://www.ghostgum.com.au/ or contact Ghostsgum Software Pty Ltd, 
   12   218 Gallaghers Rd, Glen Waverley VIC 3150, AUSTRALIA, 
   13   Fax +61 3 9886 6616.
   14 */
   15 
   16 /* $Id: cpdfscan.h,v 1.2 2002/07/26 12:09:06 ghostgum Exp $ */
   17 /* PDF scanner header */
   18 
   19 /* This is a rudimentary PDF scanner, intended to get
   20  * the page count, and for each page the Rotate, MediaBox 
   21  * and CropBox.
   22  */
   23 
   24 /* Opaque type for PDF scanner */
   25 typedef struct PDFSCAN_s PDFSCAN;
   26 
   27 /* For MediaBox and CropBox */
   28 typedef struct PDFBBOX_s PDFBBOX;
   29 struct PDFBBOX_s {
   30     float llx;
   31     float lly;
   32     float urx;
   33     float ury;
   34 };
   35 
   36 /* Open a PDF file and read trailer, cross reference tables,
   37  * and number of pages.  Returns NULL if it fails.
   38  * If print_fn is NULL, it will print error messages to stdout.
   39  * PDF file is kept open until pdf_scan_close.
   40  */
   41 PDFSCAN * pdf_scan_open(const TCHAR *filename, void *handle,
   42     int(*print_fn)(void *handle, const char *ptr, int len));
   43 
   44 /* Return number of pages in PDF file */
   45 int pdf_scan_page_count(PDFSCAN *ps) ;
   46 
   47 /* Read Rotate, MediaBox and CropBox for the specified page */
   48 /* Return 0 if OK, non-zero on error */
   49 int pdf_scan_page_media(PDFSCAN *ps, int pagenum, int *rotate,
   50     PDFBBOX *mediabox, PDFBBOX *cropbox);
   51 
   52 /* Close PDF file and ps. */
   53 void pdf_scan_close(PDFSCAN *ps);
   54