Súbor: [Platon] / cpdf / parse.h (stiahnutie)
Revízia 1.12, Mon Dec 23 02:40:05 2002 UTC (21 years, 4 months ago) by lynx
Zmeny od 1.11: +3 -3
[lines]
First phase parsing code is now very optimized...its faster than ever and he
is stable for all valid PDF.
Removed problems with decompression streams.
|
#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
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/
|