1 #ifndef MUPDF_FITZ_OUTPUT_SVG_H
2 #define MUPDF_FITZ_OUTPUT_SVG_H
3 
4 #include "mupdf/fitz/system.h"
5 #include "mupdf/fitz/context.h"
6 #include "mupdf/fitz/device.h"
7 #include "mupdf/fitz/output.h"
8 
9 enum {
10 	FZ_SVG_TEXT_AS_PATH = 0,
11 	FZ_SVG_TEXT_AS_TEXT = 1,
12 };
13 
14 /**
15 	Create a device that outputs (single page) SVG files to
16 	the given output stream.
17 
18 	Equivalent to fz_new_svg_device_with_id passing id = NULL.
19 */
20 fz_device *fz_new_svg_device(fz_context *ctx, fz_output *out, float page_width, float page_height, int text_format, int reuse_images);
21 
22 /**
23 	Create a device that outputs (single page) SVG files to
24 	the given output stream.
25 
26 	output: The output stream to send the constructed SVG page to.
27 
28 	page_width, page_height: The page dimensions to use (in points).
29 
30 	text_format: How to emit text. One of the following values:
31 		FZ_SVG_TEXT_AS_TEXT: As <text> elements with possible
32 		layout errors and mismatching fonts.
33 		FZ_SVG_TEXT_AS_PATH: As <path> elements with exact
34 		visual appearance.
35 
36 	reuse_images: Share image resources using <symbol> definitions.
37 
38 	id: ID parameter to keep generated IDs unique across SVG files.
39 */
40 fz_device *fz_new_svg_device_with_id(fz_context *ctx, fz_output *out, float page_width, float page_height, int text_format, int reuse_images, int *id);
41 
42 #endif
43