Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 16. júl 2024

Súbor: [Platon] / cpdf / parse.h (stiahnutie)

Revízia 1.13, Tue Feb 11 20:10:30 2003 UTC (21 years, 5 months ago) by lynx


Zmeny od 1.12: +3 -0 [lines]

improved reading and working with objects
remove read bug from get_startxref() if PDF uses \r\n as a newline.
better reading streams.
AND MANY MANY MORE! :))) but you still cant use it :-D

#ifndef PARSE_H
#define PARSE_H
#define MAXNAMELEN 128
#define XREFLINE 20

#define CATALOG 0
#define PAGES 1
#define PAGE 2
#define CONTENTS 3
#define RESOURCES 4
#define DATA 5
#define EOFSIZE 8        /* size of %%EOF + newline */

/* font types */
#define TYPE0 0
#define TYPE1 1
#define MMTYPE1 2
#define TYPE3 3
#define TRUETYPE 4
#define CIDFONTTYPE0 5
#define CIDFONTTYPE2 6

#define DONTPARSED 0
#define PARSE 1

int obj_count;
int *page_tree;
int current_page;

struct trailer {
    long prev;
    int root;
    int encrypt;
    int info;
} trailer;

struct type1 {
    char basename[MAXNAMELEN];
    int firstchar;
    int lastchar;
    char *tounicode;
};

struct contents {
    int length;
    char filter;
    unsigned char *stream;
};

struct resources {
    char type;
};

struct pages {
    int count;
    int parent;
    char **kids;
    char **old_kids;
};

struct page {
    struct contents *contents;
    struct resources *resources;
    short mediabox[4];
    short rotate;
    int parent;
};

struct catalog {
    int pages;
};

struct object {
    char type;
    long offset;
    int obj_num;
    void *parsed;
};

struct object **objects;

char *hex(char *buffer);
char *name(char *buffer);
char **array(char *buffer);
void parse_xref(void);
void add_obj(char *s, int num);
char *read_obj(long offset);
void parse_pdf(void);
struct page *fill_page(char *dictionary);
struct pages *fill_pages(char *dictionary);
struct contents *fill_contents(char *dictionary);
struct resources *fill_resources(char *dictionary);
struct catalog *fill_catalog(char *dictionary);
char get_filternum(char *filter);
void *get_object(int num, int *type);
#endif

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok