Questions tagged [selectpdf]
75 questions
0
votes
1 answer
SelectPDF ConvertHtmlString method truncates PDF
I'm trying to use SelectPDF library in my .NET Web Forms project to generate PDF from the HTML string and write everything to the Stream.
The problem is that when I'm trying to generate that PDF I get the truncated file.
It works fine on the…

Taras
- 45
- 4
0
votes
1 answer
Slow SelectPDF conversion after publish
I want to convert html code to pdf so I use SelectPDF library, so my code is:
var converter = new HtmlToPdf();
var today = DateTime.UtcNow;
var fileName = $"test - {today}";
…

Jesus
- 331
- 1
- 4
- 19
0
votes
1 answer
SelectPdf Html to Pdf make Image and page in equal size
I generate a card with html and then I convert it to pdf with SelectPdf converter. The problem is, I can't seem to fit the card and pdf page perfectly, without no "white paper".
My goal is that the card and pdf page are the same size, so i can print…

rokdbest
- 39
- 9
0
votes
1 answer
Is there any wat to fit the content into single page in Select PDF .Net Core?
I have written a code in .Net Core that converts the html into pdf. The nuget manager tools I used for this conversion in SelectPdf.
SelectPdf.HtmlToPdf pdf = new SelectPdf.HtmlToPdf();
System.Drawing.SizeF size = new…

Biraj Dahal
- 57
- 1
- 13
0
votes
1 answer
Image and Default background colour not rendring in SelectPdf in .net Core 5
The Image is not be render as giving the external base url in the SelectPdf Library in the .net core 5
[HttpGet()]
public IActionResult GetDocket()
{
HtmlToPdf htmlToPdf = new HtmlToPdf();
…

Jay Raj Mishra
- 110
- 2
- 9
0
votes
1 answer
SelectPDF .net core free edition: CSS issue in final pdf
I have an issue while using Select.HtmlToPdf.NetCore v 21.1.0.
please refer screenshot below which contains various view of final HTML content in different browsers or visualizers and final PDF output of same HTML
HTML visualizer view in runtime VS…

Pravin Ingle
- 3
- 2
0
votes
1 answer
Converting Html to Pdf with SelectPdf ArgumentNullException
iam new here and hope someone can help me out.
iam trying to convert a html string to a pdf version in net5. We had it running in net core 2.2 without any problems. Now we are trying to migrate everything to net5. Well the only part which is not…

Maik
- 1
- 1
- 1
0
votes
1 answer
Adding file stream for SelectPDF in Blazor (Server-Side)
I am trying to export HTML code as PDF. I need to save to client browser instead of server. All I've been able to find online is to save to root then download to browser. I'd like to avoid that step if possible.
void ExportPDF()
{
…

Wheeping
- 3
- 1
0
votes
1 answer
SelectPdf ConvertHtmlString not showing picture even with the baseUrl
I create a method to convert the HTML to HTMLString and convert it to pdf and I put the baseUrl; however, there are no pictures in pdf.
public FileResult PrintTest3(int id)
{
var viewModel = new StandardIndexData();
…

Sean166
- 3
- 3
0
votes
1 answer
SelectPDF rendering duplicate values behind the scenes
I've recently inherited some reports that are rendered with SelectPDF and am trying to resolve an issue. In this particular case, a pretty basic MVC page that renders a set of tables with page breaks in between is rendering a random assortment of…

James F
- 535
- 9
- 26
0
votes
2 answers
Is there a way to make SelectPDF break between table rows when the table is very large?
I am attempting to generate a PDF from a razor page HTML page, using SelectPDF. This html is a report that is dynamically generated, and as such any given table can have arbitrary number of elements in them.
Is there a way to make sure that when a…

TheJack38
- 384
- 1
- 3
- 13
0
votes
1 answer
Microsoft Word Verdana font rendered differently on HTML based PDF
I'm working on a PDF generated based on an HTML template. We have the template as the customer used it before (written in Word) and the font they require is Verdana.
The problem is Verdana in CSS appears to be smaller in size and has a smaller font…

Lorena Sfăt
- 215
- 2
- 7
- 18
0
votes
1 answer
C# increment number in the template footer
I am using the template footer of selectPDF library, the library has its own built in properties {{page_number}} and {{total_pages}}.
selectPDF
var footerText = $"My Export {exportJobIdIdentifier} - Page {{page_number}} of {{total_pages}} ";
var…

AlexFF1
- 1,233
- 4
- 22
- 43
0
votes
1 answer
How to convert a razor view with a form & model values (including an image URL) into a PDF?
I have a simple ASP.Net Core MVC application that is a basic form of inputs with an HTML Canvas on it (for a signature). When the form is filled out I need to convert it to a PDF and attach it to an email. I found SelectPDF which has a free,…

Mkalafut
- 729
- 2
- 13
- 34
0
votes
1 answer
Is there a way to remove the top margin on the first page only, in PDFs generated by SelectPDF?
I'm trying to generate a PDF report using SelectPDF. The report is multi-page long, and as such I need pagebreaks. Whenever these pagebreaks show up, I need top and bottom margins so the report won't look ugly, but I can only find the option to add…

TheJack38
- 384
- 1
- 3
- 13