飞碟忽略反增量和反重置

Car*_*ara 5 css php flying-saucer symfony css-paged-media

我目前正在使用 Symfony2 for PHP 和 SpraedPDFGeneratorBundle,它使用 Flying Saucer 生成 PDF。

我需要让用户输入起始页码来打印带有页码的表单。如果我做一些简单的事情

@page {
    counter-increment: page 5;
    ...
    @top-right {
        content: counter(page);
    };
}
Run Code Online (Sandbox Code Playgroud)

生成的 PDF 不会将每页增加 5。我这样做是为了测试功能,因为预期的代码是

@page {
    ...
    @top-right {
        content: counter(page);
    };
}

@page:first {
    counter-increment: page {{ startingPage-1 }}; /* The last part is Twig code for printing the starting page dynamically */
}
Run Code Online (Sandbox Code Playgroud)

为什么会发生这种情况?