Link to home
Start Free TrialLog in
Avatar of Cole100
Cole100Flag for United States of America

asked on

Need Access to generate smaller PDF

I have a module generating and attaching my reports to email. I have just upgraded from 2007 to 2010 (Acrobat 9 to Acrobat X) and my PDF size has gone from 300K to 800K. I need the file to be under 500K. I can manually export to a smaller PDF but through the module it just will not work. Any idea's? Thanks (See module code below)
Function send_emailcap_mtd()
   On Error GoTo Err_Send_Click
 
    Dim mydb As Database, RS As Recordset
    Set mydb = DBEngine.Workspaces(0).Databases(0)
    Dim attachPDF As String
    Dim docname As String, ctl As Control, strTo As String
    Dim path As String, subject As String, body As String
    Dim attach As String, blnSuccessful As Boolean
         
     Application.Echo False
    
    Set RS = mydb.OpenRecordset("qry_emailcap_mtd")
        
    path = "c:\temp\"
    docname = "emailcap_mtd"
    attachPDF = path + docname & ".pdf"
    subject = "Email Address Capture Report"
    body = "Daily Report is Attached"
    DoCmd.OutputTo acOutputReport, docname, acFormatPDF, attachPDF
 
 Do Until RS.EOF
      strTo = RS!Email
       blnSuccessful = FnSafeSendEmail(strTo, subject, body, attachPDF, "", "")
       RS.MoveNext
    Loop
    RS.Close
    Set RS = Nothing
    Set mydb = Nothing
 
exit_send_click:
     
    Application.Echo True
    Exit Function
 
Err_Send_Click:
    Resume exit_send_click
     
End Function

Open in new window

Avatar of jameslaws
jameslaws

I haven't personally played with Acrobat X yet, but if there is a way for you to set an option to save PDF in the Acrobat 9 format as a default. If not check Acrobat X to see if there is a way to set compression rates to maximum as a default.
SOLUTION
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cole100

ASKER

I am using access' built it PDF converter. With Access 2007 I was using a 3rd party converter so I would imagine that would have an effect. The 3rd party converter I was using does not work for 2010. Otherwise the report itself is exactly the same. I do not see anywhere in access to change compression of the PDF.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cole100

ASKER

The third party vendor I was using does not support 2010 and I am not having much luck finding anything else. The built in PDF generater works great other than the file size issue. Based on my research I am beginnning to think PDF will only increase in the future. (In the world of superfast internet speeds and multi-GB jump drives then why not)

The 500k limit is because my stores are on a VPN (which I have no control over) and they limit the email attachment size.
Then you may have to think about compressing (zipping) the files first...
...or ask the powers that be to increase the email attachment size.

I mean, most files (Formats) will only get bigger and bigger with time.
So this hard limit will only become more and more annoying...

In other words, ...endeavor to solve the problem (easy), instead of "Working around it" (More difficult)
TheHiTechCoach,

Thanks for the update on the PDF format..
;-)

Jeff
I was also having an issue where my 11-page PDF export was larger than desired. Doing some research I discovered I could reduce it from 645 KB to 110 KB just by changing the fonts being used in the Microsoft Access report. I changed all the fonts to be Arial. Earlier I had some that were Times New Roman, Calibri, etc.

The tip that made me think it might be a font issue was from reading this article... https://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_mac/how-to-reduce-the-size-of-pdf/0db8ad1a-ce6b-475d-a3e3-02124d8c7c19

Hopefully, this can help someone else who comes across this issue!