Solved PNG Logo in Generated PDF not Printing Clear (1 Viewer)

Weekleyba

Registered User.
Local time
Today, 06:49
Joined
Oct 10, 2013
Messages
501
I have a pdf that is generated with the following code.
The problem I have is the logo in the upper left corner, that I brought in as a png, does not print clearly once the pdf is generated.
If I print it directly from the report, it prints nice a sharp. See comparison below.
Any ideas how to improve this?
The png file is 99 KB.


Code:
Private Sub buttonEmailLetter_Click()

On Error Resume Next

Dim reportName As String
Dim criteria As String
Dim lngResult As String

lngResult = "Hello," & vbCrLf & "This is to inform you that funding has been awarded for the FY22 MIRAC BEMAR projects."
reportName = "GPA_IHS_MIRAC_Funded_Letter_BEMAR_R"
criteria = "[Location_Description] =" & "'" & Me![Location_Descriptions] & "'"

DoCmd.OpenReport reportName, acViewPreview, , criteria, acHidden 'Need to open and close report in order for this to work.
DoCmd.SendObject acSendReport, reportName, acFormatPDF, , , , "IHS FY22 MIRAC BEMAR Project Notification for -   " & _
     "" & Me![Location_Descriptions] & "", lngResult
DoCmd.Close acReport, reportName, acSaveNo

End Sub

1652906976770.png
 

bastanu

AWF VIP
Local time
Today, 04:49
Joined
Apr 13, 2010
Messages
1,173
How does it look if you use Docmd.OutputTo to create a PDF file from the report?

Cheers,
 

strive4peace

AWF VIP
Local time
Today, 06:49
Joined
Apr 3, 2020
Messages
857
Is the image stored in Access? or is Access storing the path\file to the image? If you aren't storing path\file (or storing filename and calculating path), then consider doing that! Access converts images and that might be what's causing it to lose resolution.

The Image control will render an external path\file if you set its ControlSource to that, or an expressions that gets that.
 
Last edited:

Minty

AWF VIP
Local time
Today, 12:49
Joined
Jul 26, 2013
Messages
9,286
If you use the following, generally speaking, the output is a lot better quality

DoCmd.OutputTo acReport, sRepName, acFormatPDF, sFullPath, , , , acExportQualityPrint
 

strive4peace

AWF VIP
Local time
Today, 06:49
Joined
Apr 3, 2020
Messages
857
yes, Galaxiom, you can change how images are stored in Options. Once converted though, the only way to get what is gone back is to delete and insert again
1653037924104.png
 

Weekleyba

Registered User.
Local time
Today, 06:49
Joined
Oct 10, 2013
Messages
501
Thanks Crystal!
Linking the image resulted is a very clear pdf.
1653053209602.png
 

Users who are viewing this thread

Top Bottom