1. Articles
  2. Forum
    1. Unresolved Threads
  3. Privacy Statement
  4. Contact
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Forum
  • Pages
  • More Options
  1. WPCubed Support Forum
  2. Forum
  3. VCL Tools Support
  4. WPTools 8

Change Printer

  • mbertolani
  • May 3, 2019 at 2:05 PM
1st Official Post
  • mbertolani
    Posts
    33
    • May 3, 2019 at 2:05 PM
    • #1

    When I change the printer, the paper size don't change,

    thanks

    • Quote
  • wpsupport
    Reactions Received
    36
    Posts
    1,017
    • May 3, 2019 at 9:47 PM
    • Official Post
    • #2

    There is a method, readprinterproperties you can call. It is intended that it does not change.

    • Next Official Post
    • Quote
  • mbertolani
    Posts
    33
    • May 4, 2019 at 4:04 AM
    • #3

    I'll try this and I go back to say if it works

    • Quote
  • mbertolani
    Posts
    33
    • May 8, 2019 at 7:08 PM
    • #4

    doesn't work.

    I'm trying:

    WPRichText1.ReadPrinterProperties();

    WPRichText1.ReformatAll(true, true);

    WPRichText1.Print;

    • Quote
  • wpsupport
    Reactions Received
    36
    Posts
    1,017
    • May 9, 2019 at 5:52 AM
    • Official Post
    • #5

    If it does not work, this must have other reasons.

    This is the code ReadPrinterProperties executes:

    Code
      Header.Landscape := aPrinter.Orientation = poLandscape;
      Header.PageWidth :=
        MulDiv(GetDeviceCaps(aPrinter.Handle, PHYSICALWIDTH), 1440,
        GetDeviceCaps(aPrinter.Handle, LOGPIXELSX));
      Header.PageHeight :=
        MulDiv(GetDeviceCaps(aPrinter.Handle, PHYSICALHEIGHT), 1440,
        GetDeviceCaps(aPrinter.Handle, LOGPIXELSY));

    It is always executed after PrinterSetup.

    • Previous Official Post
    • Next Official Post
    • Quote
  • mbertolani
    Posts
    33
    • May 9, 2019 at 9:10 PM
    • #6

    Sorry, it worked, we solved the problem of paper size,

    but we had a side effect on a third printer (Argox os-214)

    instead of one label, it started printing 6 labels (1 ok and 5 blanks)

    • Quote
  • wpsupport
    Reactions Received
    36
    Posts
    1,017
    • May 10, 2019 at 10:23 AM
    • Official Post
    • #7

    Try to set PrintParameter.Options := [wpDoNotChangePrinterDefaults]

    to make sure the printer is used with default options.

    • Previous Official Post
    • Quote

Similar Threads

  • Ann: WPViewPDF V4.0 - is available now

    • support
    • February 19, 2016 at 2:22 PM
    • WPViewPDF (VCL/OCX)
  1. Legal Notice
Powered by WoltLab Suite™