Results 1 to 12 of 12
  1. #1
    Phil Knapton is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    19

    Reduce PDF File Size

    Training database
    I am looking to reduce pdf file sizes to a comparable size (as if printing through Adobe PDF Printer).


    These pdf's are certificates and are sent via email to delegates who have attended a course. The certificates are branded with jpegs hence the large file size.
    When I use the acFormatPDF to generate a report the size is approx 480mb. I can use the screen res switch on the command line and I get 390mb and start to lose quality.
    If I print using Adobe's printer, I get high quality at 120mb.
    I am wanting to have this function automated rather than print to pdf with adobe for each record.

    Code used
    DoCmd.OutputTo acOutputReport, "Rptexam", acFormatPDF, "C:\Users\public\temp\Course " & [CourseID] & " - exam.pdf", False
    All files created are then grabbed by access and put in an email.
    Any advice or a nudge in the directions of a solution?

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664

    Post

    Have you tried just printing the report (certificates), but instead of selecting a printer, select PDF printer? I use PrimoPDF (its free) to convert my reports to PDF format.

    http://www.primopdf.com/index.aspx

    You can select where to save the PDF, or default it to a specific folder.

  3. #3
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    Altenatively, you can try pdfcreator.
    It is also free and good to use as pdf printer.

  4. #4
    Phil Knapton is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    19
    Thanks for the suggestions but I am looking for no user interaction when printing reports. It would be too time consuming to individually name them. Each course can have up to 2 pdf's per delegate plus an extra 4 reports. If there are 30 delegates, then this is starting to be time consuming.

    Report name example:- certificate is named ("Certificate - Course No:" &[courseid]&" - " &[del firstname]& " "&[del lastname]&".pdf" and stored in a specific directory "C:\users\public\temp" via vb.
    The process is - after entering a delegates exam results - there is a command button that stores the individual delegates certificate and exam analysis in the directory for later use.
    After exam results have been entered for all delegates there is another command button that sends to the client:-
    1. all of the certificates, individual exam analysis to the client for forwarding to delegates
    2. Reports that analyse the overall performance of delegates.
    3. A signed attendance list
    4. Questionnaire/feedback analysis
    5. And after attaching all of the above to email - I use the "kill" command to clear the directory.


    I hope I am explaining myself sufficiently here.

  5. #5
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    pdfcreator can automatically create pdf report without naming but using counter or datetime as filenames.

  6. #6
    Phil Knapton is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    19
    I need the individuals name on the filename so that when a client gets 60 pdfs via 1 email - he can then forward them to the relevant people without having to open each pdf to see who it is for.

    The certificates always have to go through the client as they are the one paying for the course.

  7. #7
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    Generate a table to store the required filenames in order.

    Write a vba code to change the filename you want after the generation of counters pdf report.

  8. #8
    Phil Knapton is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    19
    I would need to know the order of entry of the data for the reports then. It is a good idea but there are a lot of variables out of my control. It will be someone else who is doing all of the data processing and I don't want to say to them "you have to print the reports in a specific order" as I know that one day they'll do something different.
    Do you know of any way to automatically send info to the print dialog box from vb? (i.e. filename and file path) as that would be an easy solution. I could use the AdobePdf with a general print command in vb rather than the output to report.

  9. #9
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    There is vb api function call to open the file dialog box.

    See the following link
    http://www.mvps.org/access/api/api0001.htm

    As to printing dialog, see the following link
    http://www.eggheadcafe.com/software/...ialog-api.aspx

  10. #10
    Phil Knapton is offline Novice
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Posts
    19
    Thanks for that.
    The first link looks very complex and it'll probably take me a while to work out what it is doing.
    I dont need to call the dialog box, just write to it.
    I have seen some code on line that prints to adobepdf printer, waits a short time (for the dialog box to open) then sends a file name and path to the dialogbox box. I normally save links to useful looking code but in this instance, for some reason, I didn't. I have been cursing myself ever since.
    Any more ideas?

  11. #11
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    For creating adobe pdf through access ,
    See the following link whether it works.
    That's all I can find and help you!

    http://databases.about.com/c/ht/01/0...0979230537.htm

    http://www.eggheadcafe.com/software/...f-results.aspx

    http://www.tek-tips.com/viewthread.c...1119207&page=1

  12. #12
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    Good news!

    I found some good pdf printer code from Lebans Holdings 1999 Ltd.

    http://www.lebans.com/reporttopdf.htm


    The example in the file illustrates how to print pdf with the pdf file name and file path fully controlled by you in the code.
    No need to install pdf printer.

    It really works great!

    Thanks to Ken Getz and Stephen Lebans.

    A2000ReportToPDF is an Access 2000 database containing a function to convert Reports and Snapshot files to PDF documents. No PDF Printer driver is required. This archive contains new versions of the StrStorage and DynaPDF libraries. Please make sure you delete your old versions, especially if you copied them into your Windows\System32 folder. ....

Please reply to this thread with any new information or opinions.

Similar Threads

  1. With VB, how can you get the DB file size?
    By KathyL in forum Programming
    Replies: 1
    Last Post: 11-16-2010, 01:03 PM
  2. File size smaller after saving
    By Pilotwings_64 in forum Access
    Replies: 1
    Last Post: 08-20-2010, 06:21 AM
  3. Automatically Reduce Field Size
    By Rebecca in forum Access
    Replies: 4
    Last Post: 01-06-2010, 10:14 PM
  4. Compact/Reapir doe not reduce database size
    By nosrepmodnar in forum Access
    Replies: 1
    Last Post: 10-23-2009, 02:38 AM
  5. mdb file size limit
    By dr_ping in forum Access
    Replies: 1
    Last Post: 01-19-2009, 09:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums