Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Append print a PDF to AX reports

(0) ShareShare
ReportReport
Posted on by 1,310

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

  • Mark Prouty Profile Picture
    Mark Prouty 1,310 on at
    RE: Append print a PDF to AX reports

    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.

  • Bhuvana Profile Picture
    Bhuvana 20 on at
    RE: Append print a PDF to AX reports

    Did you get any breakthrough ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans