PDF Creator creates empty documents

annarannar Member Posts: 24
Hi!


I am using PDFCreator to form and send invoices with a little help from NAS. Something like this: http://www.mibuso.com/forum/viewtopic.php?t=26245

Everything works perfectly alright, except for a little problem that some of the pdf-files sent are simply empty. The size of the file is 6kb so I assume that it does create the file itself properly, just nothing is in it.

Has anyone run into this problem or has any idea of where to look for the problem?

Comments

  • SavatageSavatage Member Posts: 7,142
    The key word in your post is "some" so some do work.

    Now is there any difference between the ones that work and the ones that don't?
  • Sandeep_PrajapatiSandeep_Prajapati Member Posts: 151
    I had the same problem while working with PdfCreator to write Reports to pdf. For me when reports processing time was more, I was getting the blank pdfs.
    I handled this by putting sleep(milliseconds) after the line REPORT.RUNMODAL(ReportID,FALSE,TRUE);
    Sandeep Prajapati
    Technical Consultant, MS Dynamics NAV
  • annarannar Member Posts: 24
    Yes, some do work and some dont. I can not find anything common among those reports that do not work.

    Thnx Sandeep! I'll try this.
  • annarannar Member Posts: 24
    It still creates empty pages, tried everything.

    What other pdf-components have you used for automated invoicing?
  • Sandeep_PrajapatiSandeep_Prajapati Member Posts: 151
    edited 2008-07-14
    Hi Annar,

    Before the file should be attempted to be attached to mail, it shold be completely generated and released. So, keep waiting till the file is generated and released before attaching it to mail.
    try something like
    Report.Runmodal(****,****,****);
    WHILE NOT EXISTS(FileDirectory + PDFFileName) DO; 
    
    // then do whatever 
    

    I hope it helps O:)
    Sandeep Prajapati
    Technical Consultant, MS Dynamics NAV
  • NagiNagi Member Posts: 151
    Are you sure that the report is actually outputting something, as in maybe the filters that are set is generating an empty report? Just a suggestion.. :-k
Sign In or Register to comment.