Right edge of pdf cut off on exported Access 2010 report

Posted on 2011-10-11
Last Modified: 2012-05-12
I have a report that I would like to have automatically exported from Access 2010 using the Windows 7 Enterprise 32bit Task Scheduler.  

I have a working report and a macro, that when run manually (within Access), the report is exported as a PDF just fine. ExportedManually.pdf.  

The problem starts when I try to run the macro via a Windows 7 Scheduled Task.  When exported as a rtf, the report exports fine automatically.  When exported as a pdf, the right edge of the pdf gets cut off. ExportedAutomatically.pdf

I have used both a macro (export with formatting) and a VB function (DoCmd.OutputTo _
acOutputReport, "Test", acFormatPDF, "C:\Temp\Test.pdf"), but both have the same issue when using a Scheduled Task.

Any ideas?  
Question by:IT Strongwell
    LVL 28

    Expert Comment

    What PDF printer do you use? Some have settings such as Emulate Printer. If this is the case, ensure that it is set to an installed printer and the page setup is OK.

    Chris B

    Author Comment

    by:IT Strongwell
    I am using the PDF capabilities of Access to export as a PDF.  It's included with Office 2010, I think it was a add on in previous versions of office.

    I have used PDF writers such as CutePDF, maybe I can programmaticly print the reports to a file instead of using Access PDF functionality.  Any ideas how I would do this?
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    Not really sure...

    Can you post a sample of the "Database" that generates these PDF's?

    Sample database notes:
    1. Back up your database(s).
    2. Combine the front and back ends into one database file.
    3. Remove any startup options, unless they are relevant to the issue.
    4. Remove any records unless they are relevant to the issue.
    5. Delete any objects that do not relate directly to the issue.
    6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
    7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
    8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
    9. Compile the code. (From the VBA code window, click: Debug-->Compile)
    10. Run the compact/Repair utility.
    11. Remove any Passwords and/or security.
    12. If a form is involved in the issue, set the Modal and Popup properties to: No
        (Again, unless these properties are associated with the issue)
    13. Post the explicit steps to replicate the issue.
    14. Test the database before posting.

    In other words, a database that we can easily open and immediately see and/or troubleshoot the issue.
    And if applicable, also include a clear graphical representation of the *Exact* results you are expecting, based on the sample data.


    Accepted Solution

    In the process of preparing a bare Access database with a simple export routine, I decided to add more RAM to my PC.  I was trying to skimp by with only 512MB because this PCs sole purpose in life will be to automate reports.

    Lesson learned....always feed your computer enough RAM.  All my weird issues disappeared when I upped the RAM from 512MB to 2GB.

    Thanks for all your comments!

    Author Closing Comment

    by:IT Strongwell
    This was fortunately just a case of improper RAM feeding..

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
    Article by: Leon
    Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
    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…
    The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now