I have used your code in my project. but its give me error. like "The type initializer for 'PdfSharpCore.Utils.FontResolver' threw an exception". can you please give me solution for that.
@@NihiraTechiees I have followed your steps but when code is execute this line "PdfGenerator.AddPdfPages(document, htmlcontent, PageSize.A4);" that time error is occurred.
Can you show us an example where it will make pdf from a controller action view. Cause I try this it is not working perfectly. Somewhere some pages may missing. Any suggestion?
nice explained ! can you guide us how to create dynamic editable pdf from sql server database in dot net core? means binding data from sql server db and display it on pdf and that pdf should be editable as well? Thanks
Hi! First, great video! Thanks for sharing this content with us. I have a question. I always think about security in my projects, so I am somewhat hesitant to use packages from another author instead Microsoft or others that we already know. The question is: Is it safe to use these packages for professional projects?
Thinking how can I assign the view to HTML variable or should I copy line by line. I am losing the bootstrap formatting when I do. Can you add bootstrap as styling?
1, I hope it will support n number of users 2, follow this video ua-cam.com/video/OmkrwACAYh8/v-deo.html Here I just added image in pdf the same way you can set as background image
@@NihiraTechiees The above issue has been resolved, this is because of the wrong tags in html, now the only issue I am facing is that, the content is breaking between 2 pages.
Hi Nihira, First of all thanks for sharing the content it helped me to create pdf in blazor. I need some open source library which should create pdf from Mobile(Android,IOS) using MAUI. I have trie using your code in MAUI it got worked in windows but when I run in andriod I got exception called "System.InvalidOperationException: Cannot save a PDF document with no pages. at PdfSharpCore.Pdf.PdfDocument.DoSave(PdfWriter writer) at PdfSharpCore.Pdf.PdfDocument.Save(Stream stream, Boolean closeStream)" can you help me out on this? the exception got occure while save the doc.Save(stream)
In Production error: The type initializer for 'PdfSharpCore.Utils.FontResolver' threw an exception.||Could not find a part of the path '/usr/share/fonts/truetype'
@@NihiraTechiees I also faced this error in spite of following all the steps. Any resolution to this exception? I am working with azure functions in windows platform.
getting error as => One or more errors occurred. (The type initializer for 'PdfSharpCore.Utils.FontResolver' threw an exception.)
Have you followed all steps?
I also faced this error in spite of following all the steps. Any resolution to this exception?
I am working with azure functions in windows platform.
Super Bro, thanks for the video.. congralations for more videos
Thanks 👍
Can I use your method to generate offer letter etc in dotnet core api and angular which is fully customisable dynamic content
Yes you can do
very good video! so important to my studies! congratulations!
Great👍
I have used your code in my project. but its give me error. like "The type initializer for 'PdfSharpCore.Utils.FontResolver' threw an exception". can you please give me solution for that.
Follow the steps in the video, source code is just for reference
@@NihiraTechiees I have followed your steps but when code is execute this line "PdfGenerator.AddPdfPages(document, htmlcontent, PageSize.A4);" that time error is occurred.
Can you show us an example where it will make pdf from a controller action view. Cause I try this it is not working perfectly. Somewhere some pages may missing. Any suggestion?
Did you get any error?
nice explained ! can you guide us how to create dynamic editable pdf from sql server database in dot net core? means binding data from sql server db and display it on pdf and that pdf should be editable as well? Thanks
Sure will do in future 👍
Hi!
First, great video! Thanks for sharing this content with us.
I have a question.
I always think about security in my projects, so I am somewhat hesitant to use packages from another author instead Microsoft or others that we already know. The question is: Is it safe to use these packages for professional projects?
It's open souce only also around 10M people were using anyway just go through the license area.... My point of view we can use
@@NihiraTechiees True... I hadn't thought about it that way. Thank you very much!
Well done bro keep going on...
Thanks ✌️ will do my level best
Wow good one. 🙏🏻
Thanks
Internal server error after deploying iis… how can i solve it??
Can you confirm ,it's working in local?
I have got internal server error too after deploying kubernates server how can i fix this?
how to create in visual studio code ,
tamil la oru video podunga sir ,modles &dbcontext&controllers example videos pls
ua-cam.com/play/PLfyWdpsiUiPDcTp8SucoyN4nX1JW_Hgcm.html
Follow this series. It's in English only, I don't have much time to make tamil version
hi Nihira, can we save the MVC view as pdf instead of creating HTML?
I believe yes, bcoz it's expecting html content as input.
Please try if you found any error let me know
Thinking how can I assign the view to HTML variable or should I copy line by line. I am losing the bootstrap formatting when I do. Can you add bootstrap as styling?
can we use post request? because i want to get pdf if i pass some string and it will print that_string.pdf
Yes we can do.
Can we send any chinese text via html to pdf.....please sugg.
Yes. Please follow same step if you find any problem let me know
can you make from GraphQL to PDF instead of from HTML?
Will do in future
if i have millions of users will saving to memory stream be ideal? My second question is, how can we add background image to the generated pdf file
1, I hope it will support n number of users
2, follow this video ua-cam.com/video/OmkrwACAYh8/v-deo.html
Here I just added image in pdf the same way you can set as background image
can I change the font family throught the html content? I have been trying this but I cant.
Yes. I believe the library will support limited items
Bro is the better way to create pdf docs from html? I search for lts solution...
Yes. It's one of the best solution 👍
Pdf is not completely generating, its half, is there any configuration, there are only 2 page rendering whereas there are 5-6 pages
Can you share the html content that you used through mail, I will check & let you know
@@NihiraTechiees Here I have sent an email to you with attached html, this html is not completely rendering in pdf, It can have more sections
@@NihiraTechiees The above issue has been resolved, this is because of the wrong tags in html, now the only issue I am facing is that, the content is breaking between 2 pages.
@@NihiraTechiees can I get your email address ? want to connect with you
Cool. Can you save it to a server side folder?
Yes, since we have memory stream we can write file in the server path
Wow cool. I guess I need to learn memory stream then. Thanks!
Hi Nihira, First of all thanks for sharing the content it helped me to create pdf in blazor. I need some open source library which should create pdf from Mobile(Android,IOS) using MAUI. I have trie using your code in MAUI it got worked in windows but when I run in andriod I got exception called "System.InvalidOperationException: Cannot save a PDF document with no pages.
at PdfSharpCore.Pdf.PdfDocument.DoSave(PdfWriter writer)
at PdfSharpCore.Pdf.PdfDocument.Save(Stream stream, Boolean closeStream)" can you help me out on this? the exception got occure while save the doc.Save(stream)
For Android and ios you can use some other library
Where is located the Database ?
if you have existing database you can use
when i try to aading bootstrap 5 its not working can u please help me
Please use inline style. It's never work with external css files
In Production error: The type initializer for 'PdfSharpCore.Utils.FontResolver' threw an exception.||Could not find a part of the path '/usr/share/fonts/truetype'
Provide the exact file path then it will work. Currently it's choosing some path but it's not available that's why this error
public async Task GeneraPDFExclusion(List parametrosInvalidos, string invoice)
{
var salida = new MensajeSalida();
var document = new PdfDocument();
string HtmlContent = "hello world";
PdfGenerator.AddPdfPages(document, HtmlContent, PageSize.A4);
byte[]? response = null;
using (MemoryStream ms = new MemoryStream())
{
document.Save(ms);
response = ms.ToArray();
}
var resultado = Convert.ToBase64String(response);
salida.Respuesta = resultado;
return salida;
}
this is my code it works locally but in azure cloud it doesn't work
server linux
@@NihiraTechiees I also faced this error in spite of following all the steps. Any resolution to this exception?
I am working with azure functions in windows platform.
can we use this pdfsharp in mvc project
Yes, we can
does it also work with .NET CORE 7.0 Web API ?
Yes
@@NihiraTechiees thank you ❤️
Why would ever you pay for a new MS Office package if still 2007 version gets your job done?
Notes for my reference, even I can use notepad also. Do you have any issue seeing MS Office 2007
how to change size from A4 to POS invoice
I don't think we don't have direct option, let me check
good good
👍
How do we add custom font??
You can include in the part of dynamic html generation
Make angular video with datatable grid
Sure
Cheer Up!!
Thanks
Great
Is it possible to add the logo ?
Yes . I created separate video for adding images (logo)
@@NihiraTechiees
Where is the link for that video ?
Thanks
ua-cam.com/video/OmkrwACAYh8/v-deo.html
10/10
Glad to have his rating 👍
does that support arabic language ?
Yes
Will this work in Linux
I hope it will work
How can I insert an image with html in the pdf?
We can handle by adding img tag, In my next video will cover this one also
@@NihiraTechiees Thanks!
Video will be available Today 7.30 IST
how to change dir from right to left
Give float right
@@NihiraTechiees
didn't work
super bro
👍
Bro this api how to handle in angular
In frontend how to work respons
Will upload fronted by next week
@@NihiraTechiees waiting bro
File error in last
Are you getting error? Please cross check the GitHub source code
hello gays?
Hey buddy, it's guys , it's mis pronounced