Guest User

Untitled

a guest
Oct 19th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. @{
  2. Layout = null;
  3. }
  4.  
  5. <html>
  6.  
  7. <head>
  8. @Styles.Render("~/Content/Site.css")
  9. <title>Certificado</title>
  10.  
  11. </head>
  12. <body>
  13. <table style="width:100%; height:100%;">
  14. <tr>
  15. <td style=" background: #e4e4e2 url('../../Content/Imagens/Imagem_Direita_AQ.svg') top right no-repeat; background-size: auto 100%; text-align: center;">
  16. <h1 class="txt-font-certificado">C E R T I F I C A D O</h1>
  17. <p class="txt-18-preto">
  18. Declaremos que
  19. </p>
  20. <p class="txt-30-azul-Participante">
  21. ÉLITA BORGES SIMIONATO
  22. </p>
  23. <p class="txt-18-preto">
  24. participou do
  25. </p>
  26. <p class="txt-20-azul-evento">
  27. 8º Congresso Combate e Prevenção a Lavagem de Dinheiro
  28. <p align="center" class="txt-20-azul-evento">e ao Financiamento do Terrorismo</p>
  29. <p class="txt-18-preto">
  30. de 7/6 a 12/6/18, na cidade de São Paulo/SP,
  31. </p>
  32. <p class="txt-18-preto">
  33. promovido pela Federação Brasileira de Bancos. 
  34. </p>
  35. <p class="txt-18-preto">
  36. Carga horária: 18 horas.
  37. </p>
  38. <br />
  39. <img class="txt-assinatura" src="~/Content/Imagens/Assinatura.png" />
  40. </td>
  41. </tr>
  42. </table>
  43. @using (Html.BeginForm("Gerar", "Pdf", FormMethod.Post))
  44. {
  45. <button type="submit">Gerar PDF</button>
  46. }
  47. </body>
  48. </html>
  49.  
  50. public class PdfController : Controller
  51. {
  52. [HttpGet]
  53. public ActionResult Certificado()
  54. {
  55. return View();
  56. }
  57.  
  58. public ActionResult Gerar()
  59. {
  60. //Esse deu certo, porém perde qualidade do SVG.
  61. return new ActionAsPdf("Certificado")
  62. {
  63.  
  64. PageSize = Rotativa.Options.Size.A4,
  65. PageOrientation = Rotativa.Options.Orientation.Landscape,
  66. PageMargins = new Rotativa.Options.Margins(0, 0, 0, 0),
  67. FileName = Server.MapPath("~/Content/Certificado.pdf")
  68. };
  69. }
  70. }
Add Comment
Please, Sign In to add comment