Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @{
- Layout = null;
- }
- <html>
- <head>
- @Styles.Render("~/Content/Site.css")
- <title>Certificado</title>
- </head>
- <body>
- <table style="width:100%; height:100%;">
- <tr>
- <td style=" background: #e4e4e2 url('../../Content/Imagens/Imagem_Direita_AQ.svg') top right no-repeat; background-size: auto 100%; text-align: center;">
- <h1 class="txt-font-certificado">C E R T I F I C A D O</h1>
- <p class="txt-18-preto">
- Declaremos que
- </p>
- <p class="txt-30-azul-Participante">
- ÉLITA BORGES SIMIONATO
- </p>
- <p class="txt-18-preto">
- participou do
- </p>
- <p class="txt-20-azul-evento">
- 8º Congresso Combate e Prevenção a Lavagem de Dinheiro
- <p align="center" class="txt-20-azul-evento">e ao Financiamento do Terrorismo</p>
- <p class="txt-18-preto">
- de 7/6 a 12/6/18, na cidade de São Paulo/SP,
- </p>
- <p class="txt-18-preto">
- promovido pela Federação Brasileira de Bancos.
- </p>
- <p class="txt-18-preto">
- Carga horária: 18 horas.
- </p>
- <br />
- <img class="txt-assinatura" src="~/Content/Imagens/Assinatura.png" />
- </td>
- </tr>
- </table>
- @using (Html.BeginForm("Gerar", "Pdf", FormMethod.Post))
- {
- <button type="submit">Gerar PDF</button>
- }
- </body>
- </html>
- public class PdfController : Controller
- {
- [HttpGet]
- public ActionResult Certificado()
- {
- return View();
- }
- public ActionResult Gerar()
- {
- //Esse deu certo, porém perde qualidade do SVG.
- return new ActionAsPdf("Certificado")
- {
- PageSize = Rotativa.Options.Size.A4,
- PageOrientation = Rotativa.Options.Orientation.Landscape,
- PageMargins = new Rotativa.Options.Margins(0, 0, 0, 0),
- FileName = Server.MapPath("~/Content/Certificado.pdf")
- };
- }
- }
Add Comment
Please, Sign In to add comment