1
var writer = new PdfWriter(stream);

The above line throwing below exception in .Net7, working fine in .Net6 without doing any changes.

NotSupportedException: Either itext7.bouncy-castle-adapter or itext7.bouncy-castle-fips-adapter dependency must be added in order to use BouncyCastleFactoryCreator

Googled the error in multiple ways, but no clue. There is no forum to discuss about this issue or no post found with same issue.

User
  • 804
  • 8
  • 22
  • 3
    Use [Nuget](https://www.nuget.org/packages/itext7.bouncy-castle-adapter) to get the package, as described in the [documentation](https://kb.itextpdf.com/home/it7kb/releases/release-itext-core-8-0-0/breaking-changes-for-itext-core-8-0-0/bouncy-castle-changes). – Hans Passant Aug 01 '23 at 12:44
  • iText 8.0.0 now supports using bouncy castle for cryptographic functions. Because of this you have to manually define which implementation you want to use. So select the dependency that fit's your use case the best and add it the way @Hans described. – Guust Aug 07 '23 at 08:32

0 Answers0