    def render(self, font_config=None, counter_style=None, **options):
        """Lay out and paginate the document, but do not (yet) export it.

        This returns a :class:`document.Document` object which provides
        access to individual pages and various meta-data.
        See :meth:`write_pdf` to get a PDF directly.

        :type font_config: :class:`text.fonts.FontConfiguration`
        :param font_config:
            A font configuration handling ``@font-face`` rules.
        :type counter_style: :class:`css.counters.CounterStyle`
        :param counter_style:
            A dictionary storing ``@counter-style`` rules.
        :param options:
            The ``options`` parameter includes by default the
            :data:`DEFAULT_OPTIONS` values.
        :returns: A :class:`document.Document` object.

        """
        for unknown in set(options) - set(DEFAULT_OPTIONS):
            LOGGER.warning('Unknown rendering option: %s.', unknown)
        new_options = DEFAULT_OPTIONS.copy()
        new_options.update(options)
        options = new_options
        return Document._render(self, font_config, counter_style, options)
Lay out and paginate the document, but do not (yet) export it.

This returns a :class:`document.Document` object which provides
access to individual pages and various meta-data.
See :meth:`write_pdf` to get a PDF directly.

:type font_config: :class:`text.fonts.FontConfiguration`
:param font_config:
A font configuration handling ``@font-face`` rules.
:type counter_style: :class:`css.counters.CounterStyle`
:param counter_style:
A dictionary storing ``@counter-style`` rules.
:param options:
The ``options`` parameter includes by default the
:data:`DEFAULT_OPTIONS` values.
:returns: A :class:`document.Document` object.
weasyprint/__init__.py