Options

pdfCreator - "Save as pdf" after printing fails

BettinaBettina Member Posts: 22
Hello,

I want to save a document as pdf-file automatically after printing. So I have added a function "SaveAsPDF" in OnPostReport-Trigger. User can choose a normal printer for output or the "pdfCreator" (then he gets two pdf-files, one file is saved automatically and one file has to be saved manually). Everything works fine with normal printers. But when the user chooses pdfCreator the automatic save only works when the report has only one page. Otherwise two pdf-files will be opened for manual save.
Does anybody knows the reason for this behavior or (what I hope) a solution?
I use Navison 4.0 (SP3) and pdfCreator 1.2.0 (newest version).

Thanks in advance for any tip!

Bettina

Comments

  • Options
    davmac1davmac1 Member Posts: 1,283
    I use bullzip, so I am not as familiar with pdfcreator.
    I always set the printer conditions from the form or codeunit, then execute the report.
    When you are setting this within the report itself, I would not think you could get the same behavior since it has already generated the report at the time of the post report trigger.
  • Options
    BettinaBettina Member Posts: 22
    I have tested "Bullzip" instead of "PDFCreator" and it's the same behaviour. If the report has only one page everything works fine. But when the report has more than one page it failes. What is the different between printing one ore more pages?
  • Options
    davmac1davmac1 Member Posts: 1,283
    I don't know, except you are running it after the report has been generated.
    Try setting the output from a form or codeunit, then call the report from the same place.
  • Options
    SogSog Member Posts: 1,023
    Probably it is because when the pdf creator generates the first pdf (autosave), you probably have the same automation launch the report again for manual save (or the pdf-creator is single instance). Setting the saveoption to manual. At this point if the first pdf isen't generated by then, it could explain why it doesn't autosave.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • Options
    BettinaBettina Member Posts: 22
    I think Sog is right. You can use only one instance of pdfCreator and one of the printing jobs overwrites the options of the other job. So we use a "workaround" now and have installed two pdf-Printers, pdfCreator and Bullzip, and that works.
    Davmac1, I start the second report from a codeunit, but the codeunit is called from the first report. In the first report the user can decide if it is necessary to create the second pdf-file and thats why I have to start it from the first report.
    Thanks for your thoughts.
Sign In or Register to comment.