Skip to content

Releases: arichika/RotativaCore

4.1.0

22 Jun 09:14
f771a29
Compare
Choose a tag to compare

features

  • Property SaveOnServerPath is discontinued.
  • Support new delegate. OnNoContentAsync()
    • Specifies an alternative process in the case of an empty content response
      from the conversion source or an error response (error response to standard output)
      by wkhtmltopdf in converting an empty content.
    • Within this delegate, direct operations (e.g., redirection instructions) must be performed on the ActionContext.
    • When this process is called, TryCustomizeAsync and OnBuildFileSuccess are not executed.
    • To use this feature effectively, it is essential to return wkhtmltoX with NoContent, i.e., an empty rendering element (empty Body response). This is because wkhtmltoX will respond with an error condition on its standard output and exit.
    • To take advantage of this, I modified the internal processing so that wkhtnmltoX returns WkhtmlDriverStandardErrorException if wkhtnmltoX terminates abnormally and the return data is empty. If OnNoContentAsync() is defined in this case, this process is called because the converted data is always empty when this error is detected.
    • If OnNoContentAsync() is not defined, there is no difference in behavior except that the thrown Exception is more detailed.
        public async Task<IActionResult> TestEmptyContentActionAsPdfInline()
        {
            return new ActionAsPdf("EmptyContent")
            {
                ContentDisposition = ContentDisposition.Inline,
                OnNoContentAsync = async (ex, context) =>
                {
                    // e.g.
                    context.HttpContext.Response.Redirect("https://example.com/");
                }
            };
        }

4.0.0

22 Apr 10:44
4833b8d
Compare
Choose a tag to compare

features

  • Property SaveOnServerPath is discontinued.
  • Support new delegate. TryCustomizeAsync()
    • If you want to customize the generated binary file before OnBuildFileSuccess(), use this.
    • Please return true to continue processing, false to drop with error.
        public ActionResult TestInlie()
        {
            return new ActionAsPdf("Index")
            {
                ContentDisposition = ContentDisposition.Inline,
                TryCustomizeAsync = async (stream, context, fineName) =>
                {
                    // some code done.
                    return true;

                    // e.g.
                    var customizeStream = new MemoryStream();
                    await stream.CopyToAsync(customizeStream);

                    // ...
                    stream.SetLength(0);
                    await customizeStream.CopyToAsync(stream);

                    return true;
                },
            };
        }

2.2.0-updateSamples

12 Jan 06:42
Compare
Choose a tag to compare
2.2.0-updateSamples Pre-release
Pre-release

Update "Sample Web Application" only.
There is no change in the RotativaCore library.

2.2.0

22 May 15:47
Compare
Choose a tag to compare

2.2.0

features

  • Support new event. OnBuildFileSuccess()

2.1.1

20 Dec 11:34
Compare
Choose a tag to compare

2.1.1

features

  • support setting switch --disable-smart-shrinking, --viewport-size from C# code

fixes

  • some refactoring.
  • fix ContentDisposition behaver.
  • To downgrade the dependent module.

2.0.0

19 Dec 15:37
Compare
Choose a tag to compare

2.0.0