I'm using itext to generate pdf as follows:
public void RenderPage(string filePath)
{
using (var writer = new PdfWriter(filePath))
{
using (var pdf = new PdfDocument(writer))
{
var document = new Document(pdf);
foreach (var componentRenderer in _reportComponentRenderer)
{
componentRenderer.Value.Render(document);
}
}
}
}
<PackageReference Include="itext" Version="9.0.0" />
Getting following errors:
iText.Kernel.Exceptions.PdfException: 'Unknown PdfException.'
NotSupportedException: Either com.itextpdf:bouncy-castle-adapter or com.itextpdf:bouncy-castle-fips-adapter dependency must be added in order to use BouncyCastleFactoryCreator
Views:
38
Total Answered:
1
Total Marked As Answer:
0
Posted On:
06-Jan-2025 04:35