Questions tagged [mvcrazortopdf]

Used create pdf documents within an asp .net mvc project by generating your views as normal then returning a PdfActionResult.

https://github.com/andyhutch77/MvcRazorToPdf.

19 questions
8
votes
1 answer

iText's XmlWorker does not recognize border-bottom on table cell

XmlWorker does not recognize border-bottom on table cell. This is my code:
sports
  • 7,851
  • 14
  • 72
  • 129
3
votes
1 answer

MVCRazorToPdf (iTextSharp) using custom font

I am trying to add a custom font to my pdf output using the nuget package MVCRazorToPdf but I am having trouble with how to do this as the documentation for iTextSharp isn't great and all seems to be outdated. The current code I have for creating…
Pete
  • 57,112
  • 28
  • 117
  • 166
3
votes
2 answers

C# Asp.net RazorPdf / iTextSharp image from base64

I'm using MvcRazorToPdf in my Asp.net MVC5 project to create pdfs from model. That works fine, but I want to include an image from a base64 string, because I don't want to save the generated image. System.Drawing.Image img =…
anguish
  • 458
  • 1
  • 7
  • 27
3
votes
1 answer

MvcRazorToPdf align content to bottom of page

I am trying to get a footer in a generated pdf file. I am using this library https://github.com/andyhutch77/MvcRazorToPdf Is there any way to get some of my content to the bottom of the page? Unfortunately pdf does not respond to position:absolute;…
user1534664
  • 3,258
  • 8
  • 40
  • 66
2
votes
0 answers

MVCRazorToPDF Adding page header and footer on every pages

Can i make a header and footer on every pages created using MVCRazorToPDF Library On PDFLayout.cshtml file i am making a section for the body of PDF as @RenderBody() And in controller i am calling the action like return new…
Sebastian
  • 4,625
  • 17
  • 76
  • 145
2
votes
1 answer

Display page numbers with MvcRazorToPdf

I am trying to use this package in a project of mine and would like to display the page number. There is a property on the Document object that has the PageNumber but. I have no clue how to access it from the view Current code: PrintManager…
Jester
  • 3,069
  • 5
  • 30
  • 44
2
votes
2 answers

MvcRazorToPdf - images not rendering, MVC4

I have been trying to render an image but with no positive result. Is there anything specific I need to add to make it work. I am not including the rest of the View which renders fine, but in the pdf, the image is missing. I have followed the below…
user2281858
  • 1,957
  • 10
  • 41
  • 82
1
vote
1 answer

Align contents to right in MvcRazorToPdf library

I have below view which generates PDF invoice using MvcRazorToPdf library
Your name

Company Name

Guruprasad J Rao
  • 29,410
  • 14
  • 101
  • 200
1
vote
0 answers

MvcRazorToPdf How to download file using ajax call? MVC

I tried to use MvcRazorToPdf, i can able to generate mail merge letters. My aim is after downloading file i want to return json message from controller. how to do? Controller: [how to convert the below lines to generate pdf and download without…
1
vote
1 answer

MvcRazorToPdf installation issues

I am trying to check out MvcRazorToPdf. I'm installing it from Nuget Manager. When I attempt to build the project I get this error message: Error 5 Assembly 'MvcRazorToPdf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses…
dsb
  • 2,347
  • 5
  • 26
  • 43
1
vote
1 answer

PDF file error Cannot access a closed Stream

I would like to generate a PDF file for my reporting module. Here is my code in the controller in generating the PDF file. public ActionResult Reports_CARF(int carf_id= 0) { var data = db.Dept_Approval_Data_vw.Where(x => x.carf_id == carf_id &&…
Jen143Me
  • 273
  • 7
  • 24
1
vote
1 answer

MVCRazorTOPDf:- How to add images

I have implemented a module where i m trying to generate a PDF.PDF is generated successfully using MVCRAZORtppdf. But now I want to add a image on PDF as well.How to add a image on PDF. And I want to add image on controller level.
Shian JA
  • 848
  • 4
  • 15
  • 52
1
vote
1 answer

Cannot renders nested list within divs correclty in itextsharp

I use itextsharp & mvcrazortopdf to generate pdfs in azure websites. nested lists in div tags or table cell cannot be rendered correctly - they become one single line. here is a example:
  • test1 …
Chris C
  • 11
  • 1
1
vote
0 answers

MvcRazorToPdf alternating table row styles

I have a table that shows and hides certain rows based on some data, so I was hoping to do the row style with CSS, a la: tr:nth-child(odd) { background-color:#eee; } tr:nth-child(even) { background-color:#fff; } However, it seems MvcRazorToPdf…
1
vote
2 answers

MVCRazorToPDF save PDF to location or Blob and then download

Below is my code : public class ActionDownloadAttribute : ActionFilterAttribute { public override void OnResultExecuted(ResultExecutedContext filterContext) { …
Amit Khese
  • 102
  • 11
1
2