[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Need Access to generate smaller PDF

Posted on 2011-02-24
10
Medium Priority
?
816 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

656 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