0
I have a Link that opens a boleto on a .aspx. I need to convert this link to PDF, IE, convert the Boleto in PDF and attach it in the email I send via VB. I tried the steps of this tutorial: http://www.aspsnippets.com/Articles/Generate-Create-PDF-and-send-as-email-attachment-in-ASPNet.aspx
But it only explains how to convert when HTML is on the same page, and I need to convert another link, which contains the boleto.
I’m using itextSharp, ASP/VB.NET
Could you help me?
Thanks in advance.
=============================EDITION=====================================
I’ve tried so many ways, this is the last one I’ve tried:
Dim pdfDoc As New Document()
Dim wr As PdfWriter = PdfWriter.GetInstance(pdfDoc, New FileStream(pdfPath, FileMode.Create))
pdfDoc.Open()
pdfDoc.Add(wr)
pdfDoc.Close()
The exception I get is this: No support for URI formats.
I need a way to interpret the URL and convert Boleto to PDF, the examples I found only show how to create a new PDF from the HTML of the page itself. =[
Thank you!
you have no idea how to do or started anything?
– RFL
I have never been very happy when using libraries . NET converting HTML to PDF, so I advise you to take a look at Phantomjs, you can integrate it into your application using the following wrapper, or using the Edgejs which is available in the following nuget.
– Tobias Mesquita
@Rafaelacioly I never did anything like this, my starting point was the tutorial of the link I posted, the part of the email is functional, the question is only the conversion of the link and attach it in the email depending on how it is saved.
– C. S. F. Junior
@Tobymosque I’ll take a look at that, thank you!
– C. S. F. Junior
It’s just that usually people can help you better if you already have some piece of code or some idea of how to do it, the right question/post would be, "I’m trying to do it this way...?"
– RFL
@Rafaelacioly I edited with the excerpt I just tested.
– C. S. F. Junior