23#ifndef PDF_INTERPRET_H
24#define PDF_INTERPRET_H
243pdf_processor *
pdf_new_run_processor(
fz_context *ctx,
pdf_document *doc,
fz_device *dev,
fz_matrix ctm,
int struct_parent,
const char *usage,
pdf_gstate *gstate,
fz_default_colorspaces *default_cs,
fz_cookie *cookie,
pdf_gstate *fill_gstate,
pdf_gstate *stroke_gstate);
struct pdf_annot pdf_annot
Definition annot.h:32
@ FZ_MAX_COLORS
Definition color.h:102
pdf_processor * pdf_filter_factory_fn(fz_context *ctx, pdf_document *doc, pdf_processor *chain, int struct_parents, fz_matrix transform, pdf_filter_options *options, void *factory_options)
Definition interpret.h:298
pdf_obj * pdf_processor_pop_resources(fz_context *ctx, pdf_processor *proc)
void pdf_close_processor(fz_context *ctx, pdf_processor *proc)
void pdf_process_raw_contents(fz_context *ctx, pdf_processor *proc, pdf_document *doc, pdf_obj *stmobj, fz_cookie *cookie)
void pdf_tos_save(fz_context *ctx, pdf_text_object_state *tos, fz_matrix save[2])
fz_cull_type
Definition interpret.h:351
@ FZ_CULL_SHADING
Definition interpret.h:362
@ FZ_CULL_PATH_FILL
Definition interpret.h:353
@ FZ_CULL_PATH_STROKE
Definition interpret.h:354
@ FZ_CULL_CLIP_PATH_STROKE
Definition interpret.h:358
@ FZ_CULL_IMAGE
Definition interpret.h:361
@ FZ_CULL_CLIP_PATH_FILL
Definition interpret.h:357
@ FZ_CULL_GLYPH
Definition interpret.h:360
@ FZ_CULL_CLIP_PATH_FILL_STROKE
Definition interpret.h:359
@ FZ_CULL_PATH_FILL_STROKE
Definition interpret.h:355
@ FZ_CULL_PATH_DROP
Definition interpret.h:352
@ FZ_CULL_CLIP_PATH_DROP
Definition interpret.h:356
void pdf_tos_newline(pdf_text_object_state *tos, float leading)
pdf_processor * pdf_keep_processor(fz_context *ctx, pdf_processor *proc)
void pdf_processor_push_resources(fz_context *ctx, pdf_processor *proc, pdf_obj *res)
void pdf_process_glyph(fz_context *ctx, pdf_processor *proc, pdf_document *doc, pdf_obj *resources, fz_buffer *contents)
pdf_obj * pdf_filter_xobject_instance(fz_context *ctx, pdf_obj *old_xobj, pdf_obj *page_res, fz_matrix ctm, pdf_filter_options *options, pdf_cycle_list *cycle_up)
void pdf_tos_translate(pdf_text_object_state *tos, float tx, float ty)
void pdf_process_contents(fz_context *ctx, pdf_processor *proc, pdf_document *doc, pdf_obj *res, pdf_obj *stm, fz_cookie *cookie, pdf_obj **out_res)
void * pdf_new_processor(fz_context *ctx, int size)
void pdf_tos_reset(fz_context *ctx, pdf_text_object_state *tos, int render)
void pdf_tos_move_after_char(fz_context *ctx, pdf_text_object_state *tos)
fz_text * pdf_tos_get_text(fz_context *ctx, pdf_text_object_state *tos)
pdf_processor * pdf_new_vectorize_filter(fz_context *ctx, pdf_document *doc, pdf_processor *chain, int structparents, fz_matrix transform, pdf_filter_options *options, void *vopts)
pdf_processor_requirements
Definition interpret.h:52
@ PDF_PROCESSOR_REQUIRES_DECODED_IMAGES
Definition interpret.h:53
void pdf_tos_set_matrix(pdf_text_object_state *tos, float a, float b, float c, float d, float e, float f)
pdf_processor * pdf_new_output_processor(fz_context *ctx, fz_output *out, int ahxencode, int newlines)
void pdf_tos_accumulate_clip(fz_context *ctx, pdf_text_object_state *tos)
void pdf_tos_restore(fz_context *ctx, pdf_text_object_state *tos, fz_matrix save[2])
pdf_processor * pdf_new_run_processor(fz_context *ctx, pdf_document *doc, fz_device *dev, fz_matrix ctm, int struct_parent, const char *usage, pdf_gstate *gstate, fz_default_colorspaces *default_cs, fz_cookie *cookie, pdf_gstate *fill_gstate, pdf_gstate *stroke_gstate)
pdf_processor * pdf_new_sanitize_filter(fz_context *ctx, pdf_document *doc, pdf_processor *chain, int struct_parents, fz_matrix transform, pdf_filter_options *options, void *sopts)
void pdf_process_annot(fz_context *ctx, pdf_processor *proc, pdf_annot *annot, fz_cookie *cookie)
int pdf_tos_make_trm(fz_context *ctx, pdf_text_object_state *tos, pdf_text_state *text, pdf_font_desc *fontdesc, int cid, fz_matrix *trm, float *adv)
fz_text * pdf_tos_get_clip_text(fz_context *ctx, pdf_text_object_state *tos)
void pdf_reset_processor(fz_context *ctx, pdf_processor *proc)
pdf_processor * pdf_new_buffer_processor(fz_context *ctx, fz_buffer *buffer, int ahxencode, int newlines)
pdf_processor * pdf_new_color_filter(fz_context *ctx, pdf_document *doc, pdf_processor *chain, int struct_parents, fz_matrix transform, pdf_filter_options *options, void *copts)
struct pdf_gstate pdf_gstate
Definition interpret.h:30
void pdf_drop_processor(fz_context *ctx, pdf_processor *proc)
void pdf_count_q_balance(fz_context *ctx, pdf_document *doc, pdf_obj *res, pdf_obj *stm, int *prepend, int *append)
pdf_obj * pdf_lookup_resource(fz_context *ctx, pdf_resource_stack *stack, pdf_obj *type, const char *name)
struct pdf_obj pdf_obj
Definition object.h:44
pdf_recolor_vertex * pdf_shade_recolorer(fz_context *ctx, void *opaque, fz_colorspace *src_cs, fz_colorspace **dst_cs)
Definition resource.h:119
Definition geometry.h:388
Definition geometry.h:231
Definition interpret.h:466
void * opaque
Definition interpret.h:467
void(* image_rewrite)(fz_context *ctx, void *opaque, fz_image **image, fz_matrix ctm, pdf_obj *obj)
Definition interpret.h:469
int repeated_image_rewrite
Definition interpret.h:471
pdf_shade_recolorer * shade_rewrite
Definition interpret.h:470
void(* color_rewrite)(fz_context *ctx, void *opaque, pdf_obj **cs, int *n, float color[FZ_MAX_COLORS])
Definition interpret.h:468
Definition interpret.h:218
int gstate
Definition interpret.h:225
fz_cookie * cookie
Definition interpret.h:222
size_t string_len
Definition interpret.h:234
int in_text
Definition interpret.h:227
int xbalance
Definition interpret.h:226
pdf_obj * obj
Definition interpret.h:231
pdf_document * doc
Definition interpret.h:220
pdf_lexbuf * buf
Definition interpret.h:221
fz_rect d1_rect
Definition interpret.h:228
char name[256]
Definition interpret.h:232
int top
Definition interpret.h:235
float stack[32]
Definition interpret.h:236
Definition document.h:463
Definition interpret.h:305
pdf_filter_factory_fn * filter
Definition interpret.h:306
void * options
Definition interpret.h:307
Definition interpret.h:337
int newlines
Definition interpret.h:347
int instance_forms
Definition interpret.h:339
int recurse
Definition interpret.h:338
void(* complete)(fz_context *ctx, fz_buffer *buffer, void *opaque)
Definition interpret.h:344
pdf_filter_factory * filters
Definition interpret.h:346
int no_update
Definition interpret.h:341
void * opaque
Definition interpret.h:343
int ascii
Definition interpret.h:340
Definition resource.h:136
Definition interpret.h:57
void(* op_B)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:118
void(* op_d1)(fz_context *ctx, pdf_processor *proc, float wx, float wy, float llx, float lly, float urx, float ury)
Definition interpret.h:155
void(* op_M)(fz_context *ctx, pdf_processor *proc, float miterlimit)
Definition interpret.h:86
void(* op_i)(fz_context *ctx, pdf_processor *proc, float flatness)
Definition interpret.h:89
void(* op_SC_color)(fz_context *ctx, pdf_processor *proc, int n, float *color)
Definition interpret.h:164
void(* op_sc_color)(fz_context *ctx, pdf_processor *proc, int n, float *color)
Definition interpret.h:165
void(* op_d)(fz_context *ctx, pdf_processor *proc, pdf_obj *array, float phase)
Definition interpret.h:87
void(* op_f)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:116
void(* op_Ts)(fz_context *ctx, pdf_processor *proc, float rise)
Definition interpret.h:139
void(* op_RG)(fz_context *ctx, pdf_processor *proc, float r, float g, float b)
Definition interpret.h:169
void(* op_gs_OPM)(fz_context *ctx, pdf_processor *proc, int i)
Definition interpret.h:194
void(* op_Tw)(fz_context *ctx, pdf_processor *proc, float wordspace)
Definition interpret.h:134
void(* op_F)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:115
void(* op_BX)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:188
void(* op_S)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:113
void(* op_Wstar)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:126
pdf_resource_stack * rstack
Definition interpret.h:211
void(* op_sc_pattern)(fz_context *ctx, pdf_processor *proc, const char *name, pdf_pattern *pat, int n, float *color)
Definition interpret.h:161
void(* op_y)(fz_context *ctx, pdf_processor *proc, float x1, float y1, float x3, float y3)
Definition interpret.h:108
void(* op_gs_op)(fz_context *ctx, pdf_processor *proc, int b)
Definition interpret.h:193
void(* op_Do_form)(fz_context *ctx, pdf_processor *proc, const char *name, pdf_obj *form)
Definition interpret.h:178
void(* close_processor)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:63
void(* op_Bstar)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:119
void(* op_rg)(fz_context *ctx, pdf_processor *proc, float r, float g, float b)
Definition interpret.h:170
void(* op_BI)(fz_context *ctx, pdf_processor *proc, fz_image *image, const char *colorspace_name)
Definition interpret.h:175
void(* op_W)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:125
int refs
Definition interpret.h:58
void(* op_G)(fz_context *ctx, pdf_processor *proc, float g)
Definition interpret.h:167
void(* op_s)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:114
void(* op_gs_OP)(fz_context *ctx, pdf_processor *proc, int b)
Definition interpret.h:192
void(* op_MP)(fz_context *ctx, pdf_processor *proc, const char *tag)
Definition interpret.h:181
void(* op_gs_ca)(fz_context *ctx, pdf_processor *proc, float alpha)
Definition interpret.h:93
void(* op_w)(fz_context *ctx, pdf_processor *proc, float linewidth)
Definition interpret.h:83
void(* op_Q)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:100
void(* op_Tz)(fz_context *ctx, pdf_processor *proc, float scale)
Definition interpret.h:135
void(* op_BT)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:129
void(* op_dquote)(fz_context *ctx, pdf_processor *proc, float aw, float ac, char *str, size_t len)
Definition interpret.h:151
void(* op_gs_begin)(fz_context *ctx, pdf_processor *proc, const char *name, pdf_obj *extgstate)
Definition interpret.h:91
void(* op_cm)(fz_context *ctx, pdf_processor *proc, float a, float b, float c, float d, float e, float f)
Definition interpret.h:101
void(* op_gs_CA)(fz_context *ctx, pdf_processor *proc, float alpha)
Definition interpret.h:94
void(* op_sc_shade)(fz_context *ctx, pdf_processor *proc, const char *name, fz_shade *shade)
Definition interpret.h:163
void(* op_TL)(fz_context *ctx, pdf_processor *proc, float leading)
Definition interpret.h:136
void(* op_m)(fz_context *ctx, pdf_processor *proc, float x, float y)
Definition interpret.h:104
void(* op_g)(fz_context *ctx, pdf_processor *proc, float g)
Definition interpret.h:168
int hidden
Definition interpret.h:206
pdf_processor * chain
Definition interpret.h:214
void(* op_sh)(fz_context *ctx, pdf_processor *proc, const char *name, fz_shade *shade)
Definition interpret.h:176
void(* op_gs_UseBlackPtComp)(fz_context *ctx, pdf_processor *proc, pdf_obj *name)
Definition interpret.h:195
void(* push_resources)(fz_context *ctx, pdf_processor *proc, pdf_obj *res)
Definition interpret.h:73
void(* op_K)(fz_context *ctx, pdf_processor *proc, float c, float m, float y, float k)
Definition interpret.h:171
void(* op_k)(fz_context *ctx, pdf_processor *proc, float c, float m, float y, float k)
Definition interpret.h:172
void(* op_BDC)(fz_context *ctx, pdf_processor *proc, const char *tag, pdf_obj *raw, pdf_obj *cooked)
Definition interpret.h:184
pdf_processor_requirements requirements
Definition interpret.h:208
void(* op_gs_BM)(fz_context *ctx, pdf_processor *proc, const char *blendmode)
Definition interpret.h:92
void(* op_Tj)(fz_context *ctx, pdf_processor *proc, char *str, size_t len)
Definition interpret.h:149
int closed
Definition interpret.h:60
void(* op_b)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:120
void(* op_SC_shade)(fz_context *ctx, pdf_processor *proc, const char *name, fz_shade *shade)
Definition interpret.h:162
void(* op_Tc)(fz_context *ctx, pdf_processor *proc, float charspace)
Definition interpret.h:133
void(* op_h)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:109
const char * usage
Definition interpret.h:205
void(* op_j)(fz_context *ctx, pdf_processor *proc, int linejoin)
Definition interpret.h:84
void(* op_TJ)(fz_context *ctx, pdf_processor *proc, pdf_obj *array)
Definition interpret.h:148
void(* op_EX)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:189
void(* op_re)(fz_context *ctx, pdf_processor *proc, float x, float y, float w, float h)
Definition interpret.h:110
void(* op_EOD)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:199
void(* op_EMC)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:185
void(* drop_processor)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:64
void(* op_fstar)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:117
void(* op_ET)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:130
void(* op_Tr)(fz_context *ctx, pdf_processor *proc, int render)
Definition interpret.h:138
void(* op_ri)(fz_context *ctx, pdf_processor *proc, const char *intent)
Definition interpret.h:88
void(* op_Tm)(fz_context *ctx, pdf_processor *proc, float a, float b, float c, float d, float e, float f)
Definition interpret.h:144
void(* op_Tf)(fz_context *ctx, pdf_processor *proc, const char *name, pdf_font_desc *font, float size)
Definition interpret.h:137
void(* op_l)(fz_context *ctx, pdf_processor *proc, float x, float y)
Definition interpret.h:105
void(* op_DP)(fz_context *ctx, pdf_processor *proc, const char *tag, pdf_obj *raw, pdf_obj *cooked)
Definition interpret.h:182
void(* op_q)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:99
void(* op_v)(fz_context *ctx, pdf_processor *proc, float x2, float y2, float x3, float y3)
Definition interpret.h:107
void(* op_Td)(fz_context *ctx, pdf_processor *proc, float tx, float ty)
Definition interpret.h:142
void(* op_CS)(fz_context *ctx, pdf_processor *proc, const char *name, fz_colorspace *cs)
Definition interpret.h:158
void(* op_c)(fz_context *ctx, pdf_processor *proc, float x1, float y1, float x2, float y2, float x3, float y3)
Definition interpret.h:106
void(* reset_processor)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:65
void(* op_d0)(fz_context *ctx, pdf_processor *proc, float wx, float wy)
Definition interpret.h:154
void(* op_TD)(fz_context *ctx, pdf_processor *proc, float tx, float ty)
Definition interpret.h:143
void(* op_Do_image)(fz_context *ctx, pdf_processor *proc, const char *name, fz_image *image)
Definition interpret.h:177
void(* op_squote)(fz_context *ctx, pdf_processor *proc, char *str, size_t len)
Definition interpret.h:150
void(* op_cs)(fz_context *ctx, pdf_processor *proc, const char *name, fz_colorspace *cs)
Definition interpret.h:159
void(* op_bstar)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:121
void(* op_BMC)(fz_context *ctx, pdf_processor *proc, const char *tag)
Definition interpret.h:183
void(* op_gs_end)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:96
void(* op_n)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:122
void(* op_END)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:202
void(* op_J)(fz_context *ctx, pdf_processor *proc, int linecap)
Definition interpret.h:85
void(* op_SC_pattern)(fz_context *ctx, pdf_processor *proc, const char *name, pdf_pattern *pat, int n, float *color)
Definition interpret.h:160
void(* op_gs_SMask)(fz_context *ctx, pdf_processor *proc, pdf_obj *smask, fz_colorspace *smask_cs, float *bc, int luminosity, pdf_obj *tr)
Definition interpret.h:95
void(* op_Tstar)(fz_context *ctx, pdf_processor *proc)
Definition interpret.h:145
Definition interpret.h:44
pdf_resource_stack * next
Definition interpret.h:45
pdf_obj * resources
Definition interpret.h:46
Definition interpret.h:380
int(* text_filter)(fz_context *ctx, void *opaque, int *ucsbuf, int ucslen, fz_matrix trm, fz_matrix ctm, fz_rect bbox, int tr, float ca, float CA)
Definition interpret.h:383
int(* culler)(fz_context *ctx, void *opaque, fz_rect bbox, fz_cull_type type)
Definition interpret.h:385
void * opaque
Definition interpret.h:381
void(* after_text_object)(fz_context *ctx, void *opaque, pdf_document *doc, pdf_processor *chain, fz_matrix ctm)
Definition interpret.h:384
Definition interpret.h:505
fz_text * clip_text
Definition interpret.h:506
fz_matrix tm
Definition interpret.h:510
pdf_font_desc * fontdesc
Definition interpret.h:516
fz_rect text_bbox
Definition interpret.h:508
float char_ty
Definition interpret.h:518
fz_rect char_bbox
Definition interpret.h:515
fz_text * text
Definition interpret.h:507
fz_matrix tlm
Definition interpret.h:509
float char_tx
Definition interpret.h:517
int gid
Definition interpret.h:514
int text_mode
Definition interpret.h:511
int cid
Definition interpret.h:513
Definition interpret.h:492
float rise
Definition interpret.h:501
float leading
Definition interpret.h:496
float size
Definition interpret.h:499
int render
Definition interpret.h:500
float char_space
Definition interpret.h:493
float word_space
Definition interpret.h:494
float scale
Definition interpret.h:495
fz_string * fontname
Definition interpret.h:498
pdf_font_desc * font
Definition interpret.h:497
Definition interpret.h:416
void * opaque
Definition interpret.h:417