+ Reply to Thread
Results 1 to 8 of 8

PDFCreator - Problem Printing Multiple Sheets to One PDF file

  1. #1
    Registered User
    Join Date
    11-18-2009
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    PDFCreator - Problem Printing Multiple Sheets to One PDF file

    Windows XP SP2
    Excel 2007 SP2
    PDFCreator 0.9.3

    Hi

    I have been using the Ken Puls' (ExcelGuru) code for creating a single PDF file from multiple worksheets found here:
    http://www.excelguru.ca/node/21#MultiSingle

    SUMMARY - Ken's code assumes that jobs added sequentially to the PDFCreator job queue are cumulative, however my problem is that old jobs drop out of the queue before new jobs are added.


    I have posted a problematic excerpt of the code and the output.
    Please Login or Register  to view this content.
    So - this code executes once all the required worksheets (3 of them) have had the PrintOut method invoked. I've added some debugging code to illustrate my problem.

    Output:
    Please Login or Register  to view this content.
    As such, jobs appear to be getting added to the queue but then being processed before the rest of jobs are being added. The result is that the PDF created only contains one of the worksheets. I added the check against the Timer as part of the loop condition because my code was looping forever.

    This is an intermittent problem - when I ran this the first couple of times getting the stuff together for this post it ran perfectly!

    Any help would be gratefully received.

    Thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: PDFCreator - Problem Printing Multiple Sheets to One PDF file

    I am not familiar with XL'07, I do know it has it's own PDF writer.

    If you could write a code that hides the sheets you do not want to print, then print the entire workbook with the PDF Creator, will all the worksheets end up in one print job?


    For Example.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-18-2009
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: PDFCreator - Problem Printing Multiple Sheets to One PDF file

    Ooops. I've just realised I have dupe posted. Apologies - I thought I was on a different bulletin board....
    I originally tried to use the 2007 Save to PDF but that has a bug in SP2 that renders it useless. Also, for the 2007 Save to PDF you don't need to hide sheets - you can instead activate an array of sheets.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: PDFCreator - Problem Printing Multiple Sheets to One PDF file

    Quote Originally Posted by pootle_flump View Post
    Ooops. I've just realised I have dupe posted. Apologies - I thought I was on a different bulletin board....
    I originally tried to use the 2007 Save to PDF but that has a bug in SP2 that renders it useless. Also, for the 2007 Save to PDF you don't need to hide sheets - you can instead activate an array of sheets.
    So what is the problem?

  5. #5
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: PDFCreator - Problem Printing Multiple Sheets to One PDF file

    Need lots more here buddy -- where are you with this?

  6. #6
    Registered User
    Join Date
    11-18-2009
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: PDFCreator - Problem Printing Multiple Sheets to One PDF file

    Quote Originally Posted by davesexcel View Post
    So what is the problem?
    This:
    http://www.pcreview.co.uk/forums/sho...1#post13673021
    It is a four page discussion regarding the bug in Excel 2007 SP2 re Save to PDF.
    In short:
    This bug causes images and chart to render incorrectly. It has been known about for 6+ months. Several months ago a poster claiming to represent MS said they would release a hot fix in the next month however there has not been one. I have confirmed that Save to PDF works great in 2007 SP1. I have tried other fixes suggested in the thread, but to no effect. The reason I am now using PDFCreator is because of this.
    Quote Originally Posted by Jack in the UK View Post
    Need lots more here buddy -- where are you with this?
    Somewhat ironically, I'll need more from you What further information would help you? I have not progressed from the original problem stated in the first post. I have emailed Ken Puls and pointed him to this thread but so far no response.

  7. #7
    Registered User
    Join Date
    11-18-2009
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: PDFCreator - Problem Printing Multiple Sheets to One PDF file

    Update - Ken has been in touch with some code. I will test it and update this thread.

  8. #8
    Registered User
    Join Date
    11-18-2009
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: PDFCreator - Problem Printing Multiple Sheets to One PDF file

    Nope - Ken's code did not cover it.

    The problem only occurs if the PDFCreator process is already running i.e. if the code launches PDFCreator then it will run fine. However, it will not necessarily fail if PDFCreator is running. I can only suppose there is a setting\ something cached that is causing the error and restarted the process clears this. I'm not however any closer to bottoming out exactly what it is. Killing the service via shell as part of the code sometimes solves the issue and at other times results in a whole new set of error messages.

    This is one of those extremely annoying intermittent errors that appears to be based on the whim of the component I am calling.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1