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

Index and length must refer to a location within the string.

$
0
0

Hi

While converting an html to pdf, I am getting the below

Index and length must refer to a location within the string.
Parameter name: length

We have code like

string

exceptionMessage = string.Empty;

Aspose.Pdf.

License pdfLicense = null;

Aspose.Pdf.Generator.

Pdf pdf = newPdf();

try

{

pdfLicense =

new Aspose.Pdf.License();

pdfLicense.SetLicense(

"Aspose.Total.lic");

if (typeOfFile.Equals("html", StringComparison.OrdinalIgnoreCase))

{

pdf.BindHTML(streamToBeConvertedToPdf, string.Empty);

pdf.Save(pdfMemoryStream);

}

}

Here stream contains the HTML byte array.

We are using Aspose.pdf.dll v9.0.0.0. Please can you let us the resolution

Thanks


Viewing all articles
Browse latest Browse all 3131

Trending Articles