Customize PDF in Nop 3.8

3 years ago
Hi Team

I am migrating my site to 3.8, want to do some customization on PDF, like I dont want it to print the address name:XXXX
Address1:xxxxx
Address2:xxxxxxx
City:BBBBB
etc..

Instead it should be
XXXX
XXXXXX
XXXXXX
BBBBB
PH: 9999999 etc...

Can somebody tell me which file I need to looking into to get this done.

Kakoli
3 years ago
kakoli wrote:
Can somebody tell me which file I need to looking into to get this done.

It would be the PdfService. Though if those are the only changes you need to do you can achieve it without modifying the code just by editing the string resources for the language. Go to the language editor from the admin panel and search for resource names containing pdfinvoice. You'll see a bunch of resources called something like pdfinvoice.name with values like Name: {0}. If you remove the text part of the value and just leave the {0} it should achieve the result you want.
3 years ago
Awesome, will try that thanks a ton
1 year ago
petemitch wrote:
Can somebody tell me which file I need to looking into to get this done.
It would be the PdfService. Though if those are the only changes you need to do you can achieve it without modifying the code just by editing the string resources for the language. Go to the language editor from the admin panel and search for resource names containing pdfinvoice. You'll see a bunch of resources called something like pdfinvoice.name with values like Name: {0}. If you remove the text part of the value and just leave the {0} it should achieve the result you want.



Respected Sir,
i am using nopcommerce 3.8 and want to change packagingslip pdf according to client requirement he want same thing 3 times should to be print with 3 diffrent heading on packaginslip pdf i am doing this by using for loop i open a for loop insipde PrintPackagingSlipsToPdf method but when i am going to open pdf after its fetching error i.e "Cannot access a closed Stream." please suggest me to resolve this or suggest anyother diffrent method to print this 3 times with diffrent heading..
thanking You
1 year ago
petemitch wrote:
Can somebody tell me which file I need to looking into to get this done.
It would be the PdfService. Though if those are the only changes you need to do you can achieve it without modifying the code just by editing the string resources for the language. Go to the language editor from the admin panel and search for resource names containing pdfinvoice. You'll see a bunch of resources called something like pdfinvoice.name with values like Name: {0}. If you remove the text part of the value and just leave the {0} it should achieve the result you want.



Respected Sir,
i am using nopcommerce 3.8 and want to change packagingslip pdf according to client requirement he want same thing 3 times should to be print with 3 diffrent heading on packaginslip pdf i am doing this by using for loop i open a for loop insipde PrintPackagingSlipsToPdf method but when i am going to open pdf after its fetching error i.e "Cannot access a closed Stream." please suggest me to resolve this or suggest anyother diffrent method to print this 3 times with diffrent heading..
thanking You
1 year ago
[email protected] wrote:
Can somebody tell me which file I need to looking into to get this done.
It would be the PdfService. Though if those are the only changes you need to do you can achieve it without modifying the code just by editing the string resources for the language. Go to the language editor from the admin panel and search for resource names containing pdfinvoice. You'll see a bunch of resources called something like pdfinvoice.name with values like Name: {0}. If you remove the text part of the value and just leave the {0} it should achieve the result you want.


Respected Sir,
i am using nopcommerce 3.8 and want to change packagingslip pdf according to client requirement he want same thing 3 times should to be print with 3 diffrent heading on packaginslip pdf i am doing this by using for loop i open a for loop insipde PrintPackagingSlipsToPdf method but when i am going to open pdf after its fetching error i.e "Cannot access a closed Stream." please suggest me to resolve this or suggest anyother diffrent method to print this 3 times with diffrent heading..
thanking You


please response this...