output-svg.h 931 B

123456789101112131415161718192021222324252627282930
  1. #ifndef MUPDF_FITZ_OUTPUT_SVG_H
  2. #define MUPDF_FITZ_OUTPUT_SVG_H
  3. #include "mupdf/fitz/system.h"
  4. #include "mupdf/fitz/context.h"
  5. #include "mupdf/fitz/device.h"
  6. #include "mupdf/fitz/output.h"
  7. enum {
  8. FZ_SVG_TEXT_AS_PATH = 0,
  9. FZ_SVG_TEXT_AS_TEXT = 1,
  10. };
  11. /*
  12. fz_new_svg_device: Create a device that outputs (single page)
  13. SVG files to the given output stream.
  14. output: The output stream to send the constructed SVG page to.
  15. page_width, page_height: The page dimensions to use (in points).
  16. text_format: How to emit text. One of the following values:
  17. FZ_SVG_TEXT_AS_TEXT: As <text> elements with possible layout errors and mismatching fonts.
  18. FZ_SVG_TEXT_AS_PATH: As <path> elements with exact visual appearance.
  19. reuse_images: Share image resources using <symbol> definitions.
  20. */
  21. fz_device *fz_new_svg_device(fz_context *ctx, fz_output *out, float page_width, float page_height, int text_format, int reuse_images);
  22. #endif