We have some cases where we want to print a PDF after another AX report, for example a drawing along with a production pick list. The drawing will have different print parameters (page size, orientation, paper tray) than the pick list, so I've added a container field "PrintDrawingSettings" to table ProdParmStartUp to store the packed printJobSettings (just like existing field ProdParmStartUp.SetupPickList).
My problem is that I'm not figuring out how to unpack the printJobSettings. I started with Palle Agermark's post as a basis for my class http://www.agermark.com/2008/01/print-pdf-files-from-ax-to-specific.html. When I instantiate the printJobSettings, the printJobSettings are set as "server: makes call to client printer". I'm not seeing how to unpack the packed PrintJobSettings stored in my new field.
I'm able to see the new packed field settings get passed to the class and it looks like I'm unpacking them. I'm not seeing how to assign the unpacked settings to the new instance of PrintJobSettings.
Any help would be most appreciated, Thanks!
*This post is locked for comments
I got busy with other stuff and ended up hardcoding a printer name. I'd like to fix it sometime because I think there are other applications we'll want to generate print jobs for (like Word).
Printing to PDF is limited - you can only pass filename, printer name, driver, & port. We ended up having to create a specifically defined printer for each user anyway with all other desired print settings (orientation, page tray, paper size, duplex, etc). Then we just use the same name for all users.
Did you get any breakthrough ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156