pdfCreator - "Save as pdf" after printing fails
Bettina
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
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
0
Comments
-
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.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
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?0
-
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.David Machanick
http://mibuso.com/blogs/davidmachanick/0 -
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.0
-
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.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions