Skip to content

Commit

Permalink
updates (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
arichika authored Jun 22, 2022
1 parent 4833b8d commit f771a29
Show file tree
Hide file tree
Showing 101 changed files with 532 additions and 25,662 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ Extremely easy way to create Pdf files from ASP.NET Core
New Features
------

### 4.1.0

* 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.

```csharp
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

* Property `SaveOnServerPath` is discontinued.
Expand Down
14 changes: 0 additions & 14 deletions RotativaCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ VisualStudioVersion = 17.1.32407.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{053EF92D-D564-4D29-8554-9422F330640C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotativaCore.SampleWebApp.2.0", "src\RotativaCore.SampleWebApp.2.0\RotativaCore.SampleWebApp.2.0.csproj", "{B6CD9490-E043-48FD-9124-2AF6E7F016A4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotativaCore", "src\RotativaCore\RotativaCore.csproj", "{CAF975F6-A93E-45B7-85E0-90595E4EA986}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E6F27EEE-09BE-44F1-85FE-B2AF8F4517C2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotativaCore.WebTests", "src\RotativaCore.WebTests\RotativaCore.WebTests.csproj", "{B13F4FB9-4C26-4957-98B0-568EC2578B88}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotativaCore.UnitTests", "src\RotativaCore.UnitTests\RotativaCore.UnitTests.csproj", "{43F6E4B1-436D-4D1C-BDED-3FA05255656C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotativaCore.SampleWebApp.3.0", "src\RotativaCore.SampleWebApp.3.0\RotativaCore.SampleWebApp.3.0.csproj", "{1AAF8B2C-F313-46FB-87C6-7B6DF53A4727}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{86815082-22AE-43B1-8816-187A9BC49B2C}"
Expand All @@ -30,10 +26,6 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6CD9490-E043-48FD-9124-2AF6E7F016A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6CD9490-E043-48FD-9124-2AF6E7F016A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6CD9490-E043-48FD-9124-2AF6E7F016A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6CD9490-E043-48FD-9124-2AF6E7F016A4}.Release|Any CPU.Build.0 = Release|Any CPU
{CAF975F6-A93E-45B7-85E0-90595E4EA986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CAF975F6-A93E-45B7-85E0-90595E4EA986}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAF975F6-A93E-45B7-85E0-90595E4EA986}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -42,10 +34,6 @@ Global
{B13F4FB9-4C26-4957-98B0-568EC2578B88}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B13F4FB9-4C26-4957-98B0-568EC2578B88}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B13F4FB9-4C26-4957-98B0-568EC2578B88}.Release|Any CPU.Build.0 = Release|Any CPU
{43F6E4B1-436D-4D1C-BDED-3FA05255656C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43F6E4B1-436D-4D1C-BDED-3FA05255656C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43F6E4B1-436D-4D1C-BDED-3FA05255656C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43F6E4B1-436D-4D1C-BDED-3FA05255656C}.Release|Any CPU.Build.0 = Release|Any CPU
{1AAF8B2C-F313-46FB-87C6-7B6DF53A4727}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1AAF8B2C-F313-46FB-87C6-7B6DF53A4727}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AAF8B2C-F313-46FB-87C6-7B6DF53A4727}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -55,10 +43,8 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B6CD9490-E043-48FD-9124-2AF6E7F016A4} = {053EF92D-D564-4D29-8554-9422F330640C}
{CAF975F6-A93E-45B7-85E0-90595E4EA986} = {053EF92D-D564-4D29-8554-9422F330640C}
{B13F4FB9-4C26-4957-98B0-568EC2578B88} = {E6F27EEE-09BE-44F1-85FE-B2AF8F4517C2}
{43F6E4B1-436D-4D1C-BDED-3FA05255656C} = {E6F27EEE-09BE-44F1-85FE-B2AF8F4517C2}
{1AAF8B2C-F313-46FB-87C6-7B6DF53A4727} = {053EF92D-D564-4D29-8554-9422F330640C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down

This file was deleted.

This file was deleted.

235 changes: 0 additions & 235 deletions src/RotativaCore.SampleWebApp.2.0/Controllers/HomeController.cs

This file was deleted.

Loading

0 comments on commit f771a29

Please sign in to comment.