- /* Render to render.pdf. */
- string_map_insert (&options, "output-file", "render.pdf");
- string_map_insert (&options, "top-margin", "0");
- string_map_insert (&options, "bottom-margin", "0");
- string_map_insert (&options, "left-margin", "0");
- string_map_insert (&options, "right-margin", "0");
- string_map_insert_nocopy (&options, xstrdup ("paper-size"),
- xasprintf ("%dx%dpt", width * 5, length * 8));
- driver = output_driver_create (&options);
- if (driver == NULL)
- exit (EXIT_FAILURE);
- output_driver_register (driver);
+ /* Render to <base>.pdf. */
+ if (render_pdf)
+ {
+ string_map_clear (&options);
+ string_map_insert_nocopy (&options, xstrdup ("output-file"),
+ xasprintf ("%s.pdf", output_base));
+ string_map_insert (&options, "top-margin", "0");
+ string_map_insert (&options, "bottom-margin", "0");
+ string_map_insert (&options, "left-margin", "0");
+ string_map_insert (&options, "right-margin", "0");
+ string_map_insert_nocopy (&options, xstrdup ("paper-size"),
+ xasprintf ("%dx%dpt", width * 5, length * 8));
+ if (min_break >= 0)
+ {
+ string_map_insert_nocopy (&options, xstrdup ("min-hbreak"),
+ xasprintf ("%d", min_break * 5));
+ string_map_insert_nocopy (&options, xstrdup ("min-vbreak"),
+ xasprintf ("%d", min_break * 8));
+ }
+ driver = output_driver_create (&options);
+ if (driver == NULL)
+ exit (EXIT_FAILURE);
+ output_driver_register (driver);
+ }