Skip to content

Commit

Permalink
adds note about Umbraco
Browse files Browse the repository at this point in the history
  • Loading branch information
skttl committed May 23, 2024
1 parent 8376881 commit 5f0fd02
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,27 @@ image.SaveAsPng("document.png");
```
More info <https://docs.sixlabors.com/articles/imagesharp/configuration.html>

## Usage in Umbraco

To use in Umbraco, you must inject the configuration in an appropriate manor, eg. in a Composer.

```
using Umbraco.Cms.Core.Composing;
namespace MyUmbracoProject;
public class PdfFormatComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
var config = SixLabors.ImageSharp.Configuration.Default.Clone();
config.Configure(new ImageSharpCommunity.Formats.Pdf.PdfConfigurationModule());
}
}
```

This will be picked up by Umbraco when starting the website, and adds the necessary configuration.

## License
[MIT](LICENSE)

0 comments on commit 5f0fd02

Please sign in to comment.