Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes the pdf is empty #237

Open
JacopoDEV-ITA opened this issue May 25, 2023 · 0 comments
Open

Sometimes the pdf is empty #237

JacopoDEV-ITA opened this issue May 25, 2023 · 0 comments

Comments

@JacopoDEV-ITA
Copy link

Hello, I'm using the latest version of Rotativa (1.7.3) and I'm facing this issue: both in debug that in production, sometimes the exported pdf is empty. The structure of the page is there but all of the text is missing (take a look at the following image).

image

The weirdest part of this issue is that is not consistent: sometimes it happens, other times the pdf is fine.

Here's a snippet of my code:

public ActionResult ExportQuestionnaire(int assignmentID) { var questionnaire = db.AssignedQuestionnaires.Find(assignmentID); if (questionnaire != null) { FillQuestionnaireViewModel vm = new FillQuestionnaireViewModel(questionnaire); string filename = "questionnaire.pdf"; ViewBag.PDFExport = true; return new ViewAsPdf("FillQuestionnaire", vm) { FileName = filename }; } else { return new HttpNotFoundResult(); } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant