PDF creation in plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 年 前
Hi all

I am on version 4.40 and creating a plugin which needs to create pdfs.
Which library do you recommend using?
It seems that those nugets I find tend to not do well on .Net core (.Net 5-6)

It also seems that the builtin pdf generator in NopCommerce is not able to create custom pdfs.

Any suggestions will be appreciated.

Best regards,
Axel
2 年 前
AxelAndersen wrote:
...It also seems that the builtin pdf generator in NopCommerce is not able to create custom pdfs...


Why do you think that?   \Libraries\Nop.Services\Common\PdfService.cs  uses iTextSharp.
2 年 前
So how will I use that service for a custom pdf?
In the Interface IPdfService i dont see any methods for that.
2 年 前
AxelAndersen wrote:
It seems that the builtin pdf generator in NopCommerce is not able to create custom pdfs.


What do you man by custom pdf's - what is the content ?
2 年 前
Yidna wrote:
It seems that the builtin pdf generator in NopCommerce is not able to create custom pdfs.

What do you man by custom pdf's - what is the content ?


The content will vary.
For now its a b2b offer, sort of a contract, to send to the customer.
I would however like to make it generic so I can use it for other situations too.
An other usage could be creating a PDF with accounting numbers from the webshop to send to the bank.
2 年 前
As above you can copy PDFService and make your own version in a plugin
It is a bit time consuming and laborious as each field and the content, headings etc needs to be created just like it is in PrintOrdersToPdfAsync(...)

Then you can call the print routines from a contoller
i.e. Like PdfInvoice in nopCommerce_4.40.4_Source\Presentation\Nop.Web\Areas\Admin\Controllers\OrderController.cs

You can also automatically create pdf's from a Task
2 年 前
I think you are talking about some enterprise reporting like Active Reports, Telerik Reporting, Crystal Reports
https://www.topbestalternatives.com/activereports/
2 年 前
AxelAndersen wrote:
Hi all

I am on version 4.40 and creating a plugin which needs to create pdfs.
Which library do you recommend using?
It seems that those nugets I find tend to not do well on .Net core (.Net 5-6)

It also seems that the builtin pdf generator in NopCommerce is not able to create custom pdfs.

Any suggestions will be appreciated.

Best regards,
Axel


Sending you my Custom PDF that I use in my plugins. take a look and let me knw if you have questions
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.