File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -32,5 +32,27 @@ image.SaveAsPng("document.png");
32
32
```
33
33
More info < https://docs.sixlabors.com/articles/imagesharp/configuration.html >
34
34
35
+ ## Usage in Umbraco
36
+
37
+ To use in Umbraco, you must inject the configuration in an appropriate manor, eg. in a Composer.
38
+
39
+ ```
40
+ using Umbraco.Cms.Core.Composing;
41
+
42
+ namespace MyUmbracoProject;
43
+
44
+ public class PdfFormatComposer : IComposer
45
+ {
46
+ public void Compose(IUmbracoBuilder builder)
47
+ {
48
+ var config = SixLabors.ImageSharp.Configuration.Default.Clone();
49
+ config.Configure(new ImageSharpCommunity.Formats.Pdf.PdfConfigurationModule());
50
+ }
51
+ }
52
+
53
+ ```
54
+
55
+ This will be picked up by Umbraco when starting the website, and adds the necessary configuration.
56
+
35
57
## License
36
58
[ MIT] ( LICENSE )
You can’t perform that action at this time.
0 commit comments