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)

problem Receipt alignment to right

(0) ShareShare
ReportReport
Posted on by 2,050

I faced problem about alignment always my Receipt alignment to right side and missing data because alignment or margin always set to right

then I do customization to fix that from Retail SDK cu8-> services -> Peripherals>Printer.cs

I changed this value 

5023.1.jpg

then i deploy that after that I copied Peripherals.dll from

C:\Users\[username]\Documents\Retail SDK CU8\POS Plug-ins\POS\bin\Debug\Services

to those places

1-

C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail POS\Services

2-

C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail POS\Services\Extensions

3-

C:\Program Files (x86)\Microsoft Dynamics AX\60\Retail POS\Extensions

but noting change and same problem

and also i do this way but nothing change too

*This post is locked for comments

I have the same question (0)
  • Oksana Kovaliova Profile Picture
    3,597 on at

    Hi Mohammed,

    Do you have OPOS or Windows printer?

    The code you are pointing to is related to Windows printer + will be executed only for Bold/Double size/Double size bold text (this is defined by IF statement above your customization).

    Your link to another forum question is also related to Windows printer.

    About place to copy DLL: from R2 CU7 you need to copy DLL only to Retail POS\Extensions  folder and should NOT change or delete any standard DLLs.

    Regards,

    Oksana

  • mohammed.mqi Profile Picture
    2,050 on at

    thanks for replay
    i'm using Windows printer because i'm using Arabic language and only one is Windows printer support Arabic

    as you see here on this image alignment to right what can i do to fix that if not that code working

    DSC_5F00_0122.JPG

  • Oksana Kovaliova Profile Picture
    3,597 on at

    Hi Mohammed,

    Try to change xCaretPos as shown on picture below:

    2016_2D00_03_2D00_17_5F00_22_2D00_45_2D00_02.png

    Honestly, for me it looks like some text fields on your receipt is empty but alignment is ok... (please, see picture below)

    Can you try to create empty new receipt design, add some fields to them and test?

    2016_2D00_03_2D00_17_5F00_22_2D00_45_2D00_02.png

    Regards,
    Oksana

  • mohammed.mqi Profile Picture
    2,050 on at

    hi Oksana

    i changed value of xCaretPos to -25, but nothing change still alignment as befor

    and i also i created new empty receipt design but nothing change too

    but barcode alignment only one still good

    but other fields on footer show me alignment to right 

  • Oksana Kovaliova Profile Picture
    3,597 on at

    Hi Mohammed,

    Did you try to print the receipt from DEMO system I sent you here: community.dynamics.com/.../193200  ?

    Also the idea: did you try to print the receipt to virtual printer? (for example, One Note, PDF printer, etc.)

    Regards,

    Oksana

  • Suggested answer
    Community Member Profile Picture
    on at

    Just add the highlighted code mentioned below in printer.cs file of Peripheral project.

    private void printDoc_BeginPrint(object sender, PrintEventArgs e)
            {
                TextFontName = defaultFontName;
                TextFontSize = defaultFontSize;
                TextFontCharWidth = defaultFontCharWidth;

                var printDocument = sender as PrintDocument;
                if (printDocument != null)
                {
                    printDocument.DefaultPageSettings.Margins.Bottom = defaultPageMarginBottonForThermalPrinter;
                    printDocument.DefaultPageSettings.Margins.Left = defaultPageMarginLeftForThermalPrinter;
                    printDocument.DefaultPageSettings.Margins.Top = defaultPageMarginTopForThermalPrinter;
                }

           }

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans