?
Solved

Need Access to generate smaller PDF

Posted on 2011-02-24
10
Medium Priority
?
771 Views
Last Modified: 2012-06-22
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

0
Comment
Question by:Cole100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
  • +1
10 Comments
 

Expert Comment

by:jameslaws
ID: 34976194
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.
0
 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 248 total points
ID: 34976782
Since you are using this code:

DoCmd.OutputTo acOutputReport, docname, acFormatPDF, attachPDF

Open in new window


would indicate that you are not using Adobe Acrobat to create the PDF but the built in PDF feature in Access.  Is this correct?

In my test with Access 2007 and 2010  PDF  using the built in PDF tool the files were the same size.

have you made any changes to the report design recently?



 
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 252 total points
ID: 34980438
...or is the report simply displaying different number of records?

For example:
Your first report was of sales in Tuvalu (6 records), and the second Report was Sales in China (60,000 records)
;-)

Jeff
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

Author Comment

by:Cole100
ID: 35021051
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.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 252 total points
ID: 35021438
Then I am not sure.

1. Why must the size be below 500k?
There may come a time when the PDF format just may not produce files small enough anymore.

I mean, I would always stick with any built in utility.  In the overall scale of file sizes, 500k to 800k is not that big of a deal in most cases.

2. If the increases in file size is really intolerable, you may want to check with the manufacturer of your 3rd party vendor for an update for 2010.

(But be warned that since Office now includes a PDF utility, may of these small apps might no longer be issuing updates...)

Again, what is the story behind the 500k hard limit?

JeffCoachman
0
 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 248 total points
ID: 35028705
I have just learned from an Word MVP that a PDF show now include  tagges so that screen readers can readt the file for accessibility complaiance. My understanding is that Microsoft must make sure thier PDF output is compliant. Thus the file size will increase.

This new accessibility complaiance will be an issue for all third-party vendors that make PDF writers. So I expect the PDF will size to increase accross the board.

0
 

Author Comment

by:Cole100
ID: 35029691
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.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35030345
Then you may have to think about compressing (zipping) the files first...
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35030384
...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)
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35030403
TheHiTechCoach,

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

Jeff
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question