Skip to main content

Notifications

Microsoft Dynamics AX forum
Answered

Inserting logo into pdf

Posted on by 14
Hi, I want to insert logo into customer statement pdf and want to send the statement as an email to the customer.
I can able to generate the statement and send an email but inserting the logo is pending.
Can some one help me with x++ code for inserting logo into pdf.
Categories:
  • CU25061655-0 Profile Picture
    CU25061655-0 14 on at
    Inserting logo into pdf
    Thanks Martin, company logo field works for me thank you.
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 225,425 Super User on at
    Inserting logo into pdf
    All right, so now we're really talking about adding a logo to CustAccountStatementExt SSRS report.
     
    In F&O, CustAccountStatementExtTmp table already contains a logo (in CompanyLogo field). I'm assuming it's the same in AX 2012. You just need to use this field.
  • CU25061655-0 Profile Picture
    CU25061655-0 14 on at
    Inserting logo into pdf
    @martin I was totally confused with the requirement of the customer before, after the call with him, they are now looking to add their company logo to the CustAccountStatementExt report and want to send this report as a PDF to their customers.
    I have done the coding to send the report to the customer as a PDF, but the logo that they are looking for is an image file that I need to add to the report.
    Shall I add that image as an embedded image into the report design ??
  • Martin Dráb Profile Picture
    Martin Dráb 225,425 Super User on at
    Inserting logo into pdf
    You said you create PDF by printing a report to PDF. You're now also saying that you're using the F&O reporting framework to do that, but you seem to suggest that you're using a type of report that doesn't support images. Therefore my questions are:
    1.  What kind of report you're using? You said it's not SSRS; does it mean you're using electronic reporting?
    2. Why are you unable to add the logo there?
    Note that I said nothing about SSRS, but if you're using CustAccountStatementExtController, it does print an SSRS report by default (it's called CustAccountStatementExt).
     
    If you want to get a solution quicker, you should give us more information on your own.
  • CU25061655-0 Profile Picture
    CU25061655-0 14 on at
    Inserting logo into pdf
    Hello Martin This report is not an SSRS. For open balances, I am creating customer statements and sending them to the customers in PDF format. I have to provide the statement as a PDF and include my company's logo in that document.

    To generate statements and PDFs, I use the CustAccountStatementExtController, CustAccountStatementExtContract, and SRSPrintdestinationsettings classes.
  • Martin Dráb Profile Picture
    Martin Dráb 225,425 Super User on at
    Inserting logo into pdf
    But why? Why do you want to print a report to PDF without a logo and then doing the very complicated step of manipulating the contents of an existing PDF file? Why don't you simply add the logo to your report? When you print it to PDF, as you're doing at the moment, you'll have the logo in the PDF file.
  • CU25061655-0 Profile Picture
    CU25061655-0 14 on at
    Inserting logo into pdf
    Yes @martin, by printing report to PDF, after generating the pdf I have to add my company logo to the generated pdf. How can we add that by X++ code.
    I am using ax2012  r2 version.
  • Martin Dráb Profile Picture
    Martin Dráb 225,425 Super User on at
    Inserting logo into pdf
    How are you creating the PDF file? If by printing a report to PDF, then your actual question is how to add a logo to a report, isn't it?

    Also, what is your version of AX?

Helpful resources

Quick Links

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284,874 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,425 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans