PeachPDF
PeachPDF.PdfGenerateConfig
PdfGenerateConfig.AnimationProgress Property
Renders CSS animations (animation and @keyframes) as the single frame a PDF can hold. A
document has no clock, so instead of playing, every animation is sampled at this position in <em>its
own</em> run, from 0 (the start) to 1 (the end). null, the default, leaves
animations unapplied, so an element renders with its ordinary style, as it did before this option
existed.
public System.Nullable<double> AnimationProgress { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
0 renders each animation at its 0% keyframe and 1 at the end of its run; a value
between is that fraction of the run, eased and interpolated as a browser would at that moment. For an
animation that runs a fixed number of times the run is all of its iterations, so 0.5 of
animation-iteration-count: 3 is half way through the second iteration. An
infinite animation has no end, so its run is taken to be one iteration. animation-direction
applies, so with alternate the first iteration still runs forward and 1 shows its
100% keyframe.
animation-delay, animation-fill-mode and animation-play-state do not change what is
rendered: the frame is taken inside the run, whether or not a browser would have started it yet. Two
animations with different durations are each sampled at the same fraction of their own run, not at the
same time.
CSS transitions never apply: a transition only runs after a style changes, and a document that has just loaded has no such change. The value must be a number from 0 to 1; anything else makes generation throw an System.ArgumentOutOfRangeException.