web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to print PDF files from AX7 to specific printer

(0) ShareShare
ReportReport
Posted on by 3,006

Hi all,

Requirement: 

1. We will get a pdf file from web service.

2. This PDF file has to be sent to specific printer. 

This task might seems similar to below blog which is for AX 2012. we are looking for D365FO

http://www.agermark.com/2008/01/print-pdf-files-from-ax-to-specific.html

Highly appreciate your suggestions.

*This post is locked for comments

I have the same question (0)
  • Mea_ Profile Picture
    60,284 on at

    Why do you need AX then ? Just build app that receives files and print them to a printer.

  • krishna.rao@dax Profile Picture
    3,006 on at

    we need to print in AX, after posting of sales packing slip(has dependency with packing slip posting). getting pdf file from web service will be taken care by other person.

    Here our job is how to send this pdf file to printer.

    I think we may ignore about web service since our requirement mainly how to send pdf file to printer. like in below link

    www.agermark.com/.../print-pdf-files-from-ax-to-specific.html

    Thank you.

  • Community Member Profile Picture
    on at

    This question had appeared here before. As far as I remember, the point is, you should use the regular document routing agent. Like, for a regular printing, so setup should be the same regular as well. Then from code, build your zebra commands into a str, like this;

    DocumentContractFactory factory = DocumentContractFactory::Instance;

    ZebraDocumentContract documentContract = factory.Create(DocumentContractType::Zebra);

    documentContract.TargetType = TargetType::Printer;

    documentContract.Settings = 'printer path';

    documentContract.Name = "AXLabel";

    documentContract.Contents = SerializationHelper::ConvertStringToByteArray(your str, System.Text.Encoding::ASCII);

    SrsReportRunPrinter::sendDocumentContractToDocumentRouter(documentContract);

    I'm not a huge fan of dealing with that this way and more prefer to use basic editing tools with no code https://ds11.pdffiller.com/ but this solution above is free and more relevant to you, I guess

  • krishna.rao@dax Profile Picture
    3,006 on at

    we also need to send PDF label to Zebra printer. It seems objects/classes are not available what you mentioned DocumentContractFactory ,ZebraDocumentContract ..etc.  in AX & getting error. Also the link  https://ds11.pdffiller.com/ seems not relevant to us (related to passport).

    Here we are discussing about "How to send pdf file to printer" in D365FO(AX7) through x++ , after configuring Document routing agent.

    Highly appreciate if anyone could share their experience on this.

    Thank you..

  • krishna.rao@dax Profile Picture
    3,006 on at

    Hi peers,

    any suggestions.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Scott_itD Profile Picture

Scott_itD 2 Community Manager

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans