Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Unable to create PDF via API

$
0
0
Hi,

I am using Aspose.pdf.dll v9.4.0.0 with valid license. Follow the sample code in documentation but unable to create the PDF. All I get is a PDF with empty content and watermark. 

Code:

Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();

        Aspose.Pdf.License lic = new Aspose.Pdf.License();
        lic.SetLicense("Aspose.Total.lic");
        
        Aspose.Pdf.Generator.Section sect = pdf.Sections.Add();//new Aspose.Pdf.Generator.Section(pdf);

        //foreach (var item in listofstring)
        //{
            sect.Paragraphs.Add(new Aspose.Pdf.Generator.Text("test test test "));
        //}

       
        pdf.Save(@"d:\pdf1.pdf");

Viewing all articles
Browse latest Browse all 3131

Trending Articles