1

Iron pdf license does not work when i deploy my project on aws when i used check license in localhost it returns true

private async Task<ReturnResult<byte[]>> GetReportPdf(long id)
    {
        try
        {
            var command = await Mediator.Send(new GetHearingReportForPrint_Query { Id = id });
            var printTemplate = command.Data.PrintSettingsTemplate;


            
            // Check if IronPdf is licensed successfully 
            bool is_licensed = IronPdf.License.IsLicensed;


            var ChromePdfRenderer = new ChromePdfRenderer();

            ChromePdfRenderer.RenderingOptions.MarginLeft = 10;
            ChromePdfRenderer.RenderingOptions.MarginRight = 10;
            ChromePdfRenderer.RenderingOptions.MarginTop = 60;
            ChromePdfRenderer.RenderingOptions.CustomCssUrl = "wwwroot/css/print-style.css";

i set TempFolderPath in startup constructor

 public class Startup
{
    public Startup(IConfiguration configuration)
    {
        Configuration = configuration;
        IronPdf.Installation.TempFolderPath = @"/tmp";

    }

1 Answers1

0

Please set the license key before this licensing check:

// Check if IronPdf is licensed successfully 
bool is_licensed = IronPdf.License.IsLicensed;

Add:

// Set the license key
IronPdf.License.LicenseKey = "IRONPDF-YOUR-KEY-HERE-EXPIRES.2023";

// Check if IronPdf is licensed successfully 
bool is_licensed = IronPdf.License.IsLicensed;

If you don't have a trial key, please request one at ironpdf.com

darren
  • 475
  • 4
  • 15