logo pdf

This public forum is for user-to-user discussions of ASPMaker. Note that this is not support forum.

logo pdf

Postby darioctas » Fri Jun 03, 2016 5:04 am

How I can add my company logo to a pdf report?

Thanks
darioctas
 
Posts: 12
Joined: Wed Feb 25, 2015 2:46 am

Re: logo pdf

Postby motfs » Fri Jun 03, 2016 10:49 am

Use Page_DataRendering server event to add header, e.g.

If <Table>.Export = "pdf" Then ' Add header for Export to PDF
header = "<HTML code for image>"
End If
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: logo pdf

Postby darioctas » Wed Jun 08, 2016 5:50 pm

I put this code , but does not work

' Page Data Rendering event
Sub Page_DataRendering(header)

If <Table>.Export = "pdf" Then
header = <img src="images/logo.png" width="472" height="47" alt=""/>
End If


End Sub
darioctas
 
Posts: 12
Joined: Wed Feb 25, 2015 2:46 am

Re: logo pdf

Postby motfs » Fri Jun 10, 2016 1:04 pm

darioctas wrote:
> header = <img src="images/logo.png" width="472" height="47" alt=""/>

The correct syntax is:

header = "<img src='images/logo.png' width='472' height='47' alt=''/>"
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: logo pdf

Postby josel » Thu Oct 05, 2017 1:53 pm

Hello:
I am using aspmaker 2017 and I try to insert a logo in the print. I have introduced this, but it does not work, can you help me ?. Thank you

' Page Data Rendering event
Sub Page_DataRendering(header)
' Example:
'header = "your header"
header = "<img src='logo.jpg'/>"
End Sub

In what section of Code (Server Events, client scripts and custom templates) should I enter it?
josel
 
Posts: 1
Joined: Thu Oct 05, 2017 2:16 am

Re: logo pdf

Postby Webmaster » Fri Oct 06, 2017 9:27 am

Make sure also that the logo image exists in the correct relative path. For example, if you use <img src='logo.jpg'>, make sure that the file 'logo.jpg" exists in the application root folder.
Webmaster
 
Posts: 10731
Joined: Fri Aug 06, 2004 5:59 pm


Return to General Discussion (ASPMaker)