Trying to convert angular page to HTML, causing issues

Hi All,
I am getting the Web response html from a web url which contains some angular tags and angular attributes (like _ngcontent-sc1="") in to it. So when I try to convert this angular tag and with attribute html into pdf using ASPOSE.PDF .net nuget from C# application it gives me error as below and if I remove those angular attributes (like _ngcontent-sc1="") it works well. Please help.

Error Details as below,
System.NullReferenceException: ‘Object reference not set to an instance of an object.’

at #=zKfe6aPcAuEqDYGeuPadKZ8NiHvlDrcMBeQ87VwA=.#=zO4P6kKe8d6nU(#=zHNQV5TUqIZ3T$stRPiPSscgJ9SWuYOUbkw== #=zvRl7US0=, #=zTeCeYuHBH2PWUlMG8igRwNlnFrAsKcAXIqJMOj8= #=z5bducP4=, String #=ziSGOK60=)
at #=zKfe6aPcAuEqDYGeuPadKZ8NiHvlDrcMBeQ87VwA=.#=zUGFtb_5Pm34a(#=zHNQV5TUqIZ3T$stRPiPSscgJ9SWuYOUbkw== #=zvRl7US0=, #=zTeCeYuHBH2PWUlMG8igRwNlnFrAsKcAXIqJMOj8= #=z5bducP4=, String[] #=z5A25nmNtN8cX)
at #=zmyaPWoiALkgLx2BwUmnY_gtcOl421QM4KA==.#=zu_4ZL5YM16ma(List1 #=zdG10pRgbJcHr) at #=zFUZNnEWjveauHuwyNrRUBygHCddqcHBX7w==.#=zvYFqlp4q4Pzi(List1 #=zdG10pRgbJcHr)
at #=zLqTFVOYb8cPH05IRq3eodl_O_txoSrmXhpPBYcU=.#=z1hTw6ZkFcSq2()
at #=zLqTFVOYb8cPH05IRq3eodl_O_txoSrmXhpPBYcU=.#=z7Wh_tPDoyxZe(#=z$i_znGxgGveM7AvStnpQonzFuW3DcDZn1A== #=zWbIEFS8=)
at #=zLqTFVOYb8cPH05IRq3eodl_O_txoSrmXhpPBYcU=.#=z7Wh_tPDoyxZe(#=z$i_znGxgGveM7AvStnpQonzFuW3DcDZn1A== #=zWbIEFS8=)
at #=zLqTFVOYb8cPH05IRq3eodl_O_txoSrmXhpPBYcU=.#=z7Wh_tPDoyxZe(#=z$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IVX2t1_vbkmbxC9f #=zY1SRpYQ=)
at #=zOEamI3HQkcpwjO8tTrCGKTucy12Jligu1w==.#=zZgS6Ggs=()
at #=zOEamI3HQkcpwjO8tTrCGKTucy12Jligu1w==.#=zh3GZ56M=()
at #=zDukuP5BZt8P0o4BN3FenEyLVCubBvn63eQ==.#=zPig_h5OQo8Z2(#=z7FzrkPJb1LAtrmVLgmDvJV4= #=zDuJpLdasDbZ1KxAuuA==, #=zefMD0wKZsvEdpBFqmiOxBwNAA07G[] #=zeWdMMUf6iA3y, #=zMKXjOtvnR86HIVX2t1_vbkmbxC9f #=zY1SRpYQ=, TimeSpan #=ztLgItM0=)
at #=z$Ywdu4IApwRqm2wWrlVPRCJzHgIL.Render(#=zMKXjOtvnR86HIVX2t1_vbkmbxC9f #=zY1SRpYQ=, TimeSpan #=ztLgItM0=, #=ztb48i0CZ28RZO9Q5i7IwFOI=[] #=z$r0P1_8=, #=zLLy0hvIp11ceEqbUiufn2yM=[] #=zWbWWqhU=)
at #=z$Ywdu4IApwRqm2wWrlVPRCJzHgIL.Render(#=zMKXjOtvnR86HIVX2t1_vbkmbxC9f #=zY1SRpYQ=, TimeSpan #=ztLgItM0=, #=zLLy0hvIp11ceEqbUiufn2yM=[] #=zWbWWqhU=)
at #=zeJ6DQhL2iGO6omVwQZ1snfJslinH.Render(#=zMKXjOtvnR86HIVX2t1_vbkmbxC9f #=zY1SRpYQ=, #=zakkABAs= #=zS3Mmazo=, TimeSpan #=ztLgItM0=)
at #=zeJ6DQhL2iGO6omVwQZ1snfJslinH.Render(#=zMKXjOtvnR86HIVX2t1_vbkmbxC9f #=zY1SRpYQ=, #=zakkABAs= #=zS3Mmazo=)
at #=z83z6LTQ0Tr76Dd4wCnZoVM0GnYmB.#=ziFOr5UnIR4ug(Stream #=zujCND3qRYEAG, Document #=zspz5VcOjo0Ev, HtmlLoadOptions #=z$k41PQoes$qS, String #=zhOuw5_dLGamM)
at #=z83z6LTQ0Tr76Dd4wCnZoVM0GnYmB.#=zZzZdu9I=(Stream #=zujCND3qRYEAG, Document #=zspz5VcOjo0Ev, HtmlLoadOptions #=z$k41PQoes$qS, String #=zhOuw5_dLGamM)
at #=z83z6LTQ0Tr76Dd4wCnZoVM0GnYmB.#=zZzZdu9I=(Stream #=zujCND3qRYEAG, Document #=zspz5VcOjo0Ev, HtmlLoadOptions #=z$k41PQoes$qS)
at Aspose.Pdf.Document.#=zgOXlgtM=(Stream #=zXC0tGXA=, LoadOptions #=zJOO1I9k=)
at Aspose.Pdf.Document…ctor(String filename, LoadOptions options)
at PDFCreatorWeb.Controllers.HomeController.ConvertHTMLtoPDFAdvanced_WebPage() in H:\temp\PDFCreatorWeb\Controllers\HomeController.cs:line 207

@_rajeshprudential

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input PDF/HTML document.
  • Please create a sample application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

@tahir.manzoor

Hi All,
I am trying to convert attached html into a PDF, but it is giving me error as a mentioned in current thread.
Below code I am using,
public void ConvertHTMLtoPDFAdvanced_WebPage()
{

		HtmlLoadOptions options = new HtmlLoadOptions()
        {
            PageInfo = { Width = 842, Height = 1191, IsLandscape = true },
            IsEmbedFonts = false
        };
		
		//FontRepository.Sources.Clear();
        FontRepository.Sources.Add(new Aspose.Pdf.Text.FolderFontSource(@"C:\Fonts\"));
        FontRepository.LoadFonts();

        Font font = FontRepository.FindFont("Knockout-HTF48-Featherweight");
		Document pdfDocument = new Document(@"C:\index.htm", options);
        
        pdfDocument.Save(@"C:\html_test.PDF");
	}

Please help. Even I tried supplying fonts too but that did not worked.
Please find attached html file along with fonts which I am converting to PDF.
FilesZip.zip (50.1 KB)

@_rajeshprudential

We have logged this problem in our issue tracking system as PDFNET-51987. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.