ABCpdf renders blank PDF when Angular app is hosted on Azure App Service (works fine on VM)

Discussão em 'Angular' iniciado por Bhautik Dalicha, Julho 2, 2025.

  1. I'm using ABCpdf (v12) in a .NET application to generate PDFs from an Angular route.

    Here’s the behavior I’m seeing:

    Angular app with client-side routing (/#/pdfgeneration/:id/:year/:type)

    Deployed to Azure App Service (Windows)

    Also tested the same Angular app on a Windows VM (IIS)

    API endpoints used by Angular are open and accessible, no CORS issues

    Using ABCpdf with Chrome engine and UseScript = true

    Doc doc = new Doc();
    doc.HtmlOptions.Engine = EngineType.Webkit;
    doc.HtmlOptions.UseScript = true;
    doc.HtmlOptions.Timeout = 120000;
    doc.HtmlOptions.RepaintDelay = 60000;
    doc.HtmlOptions.RepaintTimeout = 60000;

    int id = doc.AddImageUrl("https://<myapp>.azurewebsites.net/#/pdfgeneration/1/2026/1", true, 0, true);
    doc.SaveDOM("debug.html"); // To inspect what ABCpdf is rendering

    doc.Save("output.pdf");
    doc.Clear();

    Continue reading...

Compartilhe esta Página