Hello,
I’m trying to convert an angular-gantt chart to PDF but is not having any luck.
Demo gantt chart that I’d like to convert to PDF: Phishing Warning - Plunker
Just to test out to see if Aspose.Pdf can export the HTML properly, i used Chrome to download the complete page with its resources, then try to have Aspose.Pdf generates the PDF.
Please see attachment for demo project.
class Program
{
private static string AsposeLicenseBase64 => “insert base64 license”;
static void Main(string[] args)
{
using (var license = new MemoryStream(Convert.FromBase64String(AsposeLicenseBase64)))
{
var pdfLicense = new License();
pdfLicense.SetLicense(license);
}
//goal: i want to convert an angular-gantt chart to pdf
//demo chart: Phishing Warning - Plunker
//in this example, i used chrome to open the above URL, press Ctrl+S to save the webpage (complete with resources)
//then use the codes below to generate the PDF, however, the output does not look like how it is displayed
//is there anything else I can do differently?
//note: see the /bin/Debug folder for the html file and its resources
var htmloptions = new HtmlLoadOptions();
var doc = new Document(“lrC5RFfeItMA5JCVMVWF.html”, htmloptions);
doc.Save(“output.pdf”);
}
}