Send Report to Outlook = ugly JPEG compression (1 Viewer)

zeroaccess

Active member
Local time
Today, 15:46
Joined
Jan 30, 2020
Messages
586
Hey all,

I have a great report going and it prints well, but on sending to email, the generated .pdf uses jpeg compression and it looks pretty bad. The images (a couple of logos) look low resolution and are surrounded by artifacts.

I have tried both the macro and the VBA methods and they appear the same. Any idea how to control pdf quality?
 

GinaWhipp

AWF VIP
Local time
Today, 16:46
Joined
Jun 21, 2011
Messages
5,627
Probably not the answer you were hoping but I switched to PNG's and have not had that issue since.
 

zeroaccess

Active member
Local time
Today, 15:46
Joined
Jan 30, 2020
Messages
586
Probably not the answer you were hoping but I switched to PNG's and have not had that issue since.
Good thought, but they are PNGs! Something during the generate PDF stage is uglifying them.
 

GinaWhipp

AWF VIP
Local time
Today, 16:46
Joined
Jun 21, 2011
Messages
5,627
Hmm, odd. Are you using the Image Control on your Report? And do you have it set to to Zoom or Clip? I use Clip.
 

zeroaccess

Active member
Local time
Today, 15:46
Joined
Jan 30, 2020
Messages
586
One of them is a clip, the other is a zoom. Both have the ugliness on the pdf. I think its doing some downsampling and compression. I know when I save a PDF myself, I have the option to adjust that kind of thing:

Compression.png

I would love to find a way to set those options.
 

zeroaccess

Active member
Local time
Today, 15:46
Joined
Jan 30, 2020
Messages
586
I just created two command buttons on the Report.

Using the macro ExportWithFormatting or VBA:

Code:
DoCmd.OutputTo acOutputReport, , acFormatPDF, "C:\Temp\Report.pdf", True, , , acExportQualityPrint
I get nice crisp icons. The key is the acExportQualityPrint. If I use the button with QualityScreen I get the ugliness. That is because it is using the lower quality settings as shown above during the save process (invisible to user).

There doesn't seem to be a way to set this switch with SendObject or EmailDatabaseObject. If you find a way, I would be grateful!

Otherwise, I suppose the workaround would be to use more VBA to open a new email, attach the saved PDF, and set the subject line. It doesn't make sense that we would have to do this, since we already have a function for it! I also do not know how.
 

GinaWhipp

AWF VIP
Local time
Today, 16:46
Joined
Jun 21, 2011
Messages
5,627
I never use those buttons. I save the file to a predetermined path, attach to eMail and then delete once the eMail has been sent except where keeping a copy is required to hold revision information. Then you really don't have to open the eMail unless you want your Users to input some text.
 

zeroaccess

Active member
Local time
Today, 15:46
Joined
Jan 30, 2020
Messages
586
And I do. The user needs to chose who will receive the email (not the same each time) and input their own personal jingle in the body.

So you must have a command button with a routine that combines the best of both approaches? Save as high quality with DoCmd.OutputTo, then attach to new email and set the subject line? I'm curious about the VBA for the email part.
 

GinaWhipp

AWF VIP
Local time
Today, 16:46
Joined
Jun 21, 2011
Messages
5,627
I do not need to include the extra part about image quality as I said before, do not have that problem. I have a button that opens a Form that shows the attached file and allows the User to select the Recipient and enter the body, Subject Line already entered, and send. I also have it so it just puts in a predetermined message and subject, attaches the file and sends the eMail. Hmm, plus a few other assorted variations.

Here is one that loops a recordset...

See is this works for you for the eMail part.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom