locked
loading image in pdf view RRS feed

  • Question

  • User616860969 posted


    cssfile:
    .imagepdfchk {
    content: url(https://d30y9cdsu7xlg0.cloudfront.net/png/2180-200.png);
    width: 15px;
    height: 15px;


    code:
    MemoryStream ms = new MemoryStream();
    Document pdfDoc = new Document(PageSize.A4, 30f, 20f, 80f, 15f);
    var writer = PdfWriter.GetInstance(pdfDoc, ms);
    pdfDoc.Open();

    consentFormData="<br/> <span class='imagepdfchk'></span> " + txtbox.Text;
    using (var cssMemoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(cssText)))
    {
    using (var htmlMemoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(consentFormData)))
    {
    XMLWorkerHelper.GetInstance().ParseXHtml(writer, pdfDoc, htmlMemoryStream, cssMemoryStream);
    }
    }

    pdfDoc.Close();

    here image is not loading 

    Wednesday, May 31, 2017 11:21 AM

All replies