|
Rank: Member Groups: Member
Joined: 5/22/2012 Posts: 11
|
Hi , I'm trying to create a template pdf with placeholders .So whenever a request comes I can render svg in a that placeholder for that user. I have made SVG in html , before this i was using directly html to pdf so that was working fine for me. But now I am using template pdf I want to add html to specific placeholder and render that as html not as string. Is there any way i can do it.??
Thanks in advance, Naman Ahuja
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
|
|
Rank: Member Groups: Member
Joined: 5/22/2012 Posts: 11
|
NO... Basically I have my own placeholder in pdf.I want to add html in that placeholder. As per my assumption it only accepts string. Any way I can add HTML in that placeholder.
Thanks in advance, Naman Ahuja
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You can't. This is what you can do with our product:
Render HTML into an existing PDF file at any location.
So for example, if you already know your place holder is at page 2 at location (x = 1, y = 1, w = 5, h = 2), then you can use our product to render HTML to that location. If the position is not known, then you should consider using HTML template and have the placeholders inside your HTML template.
Thanks
|
|
Rank: Member Groups: Member
Joined: 5/22/2012 Posts: 11
|
Hi, can you give a small sample code on how can i do this ? i mean lets say i know the position at which i want to render html, how can i do that ? a small piece of sample code would be of great help.
Thanks in advance, Naman Ahuja
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, You would set the output area by setting HtmlToPdf.Options.OutputArea: http://www.essentialobjects.com/doc/4/htmltopdf/page_size.aspxThen call HtmlToPdf.ConvertHtml/ConvertUrl that takes a PdfPage object. For example, you can use this ConvertHtml overload: http://www.essentialobjects.com/doc/4/eo.pdf.htmltopdf.converthtml_overload_3.aspxThanks!
|
|
Rank: Member Groups: Member
Joined: 5/22/2012 Posts: 11
|
hi, thanks for the reply . One more thing i wanted to know , is there anyway i can find the exact location of block on Pdf, so that i can calculate the exact position where i want to render my html elements.
Thanks in advance, Naman Ahuja
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Yes. Please take a look of the HtmlToPdfResult object returned by ConvertHtml/ConvertUrl.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/22/2012 Posts: 11
|
Hi ,
Cont. on the same topic, I am rendering an Image on the page . After the image is rendered can I write Text on the same image,while i know the x and y position , without using htmltopdf?
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Please take a look of the documentation and samples for the "PDF Creator" section.
Thanks
|
|
Rank: Member Groups: Member
Joined: 5/22/2012 Posts: 11
|
hi, I little specifation will def help.
THANKS
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You will need to read what's already there first. We are happy to guide you towards the solution, but we don't do your work. So you have to put some effort first. Without any effort from your side, we would be basically doing your job. We do not do that. Hope you understand.
Thanks!
|
|