XpGetPageDimensions(3Xp)

okay bestie, you've found XpGetPageDimensions(3Xp) β€” one of the XPRINT FUNCTIONS girlies πŸ’–. She's here to hand you page dimensions for the current printer settings, and honestly? iconic.

🌸 NAME 🌸

XpGetPageDimensions β€” gets the page dimensions for the current printer settings. no cap.

✨ SYNOPSIS ✨

cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>

Status XpGetPageDimensions ( display, print_context, width, height,
reproducible_area )
      Display *display;
      XPContext print_context;
      unsigned short *width;
      unsigned short *height;
      XRectangle *reproducible_area;

πŸŽ€ ARGUMENTS πŸŽ€

  • display β€” specifies a pointer to the Display structure; you get this back from XOpenDisplay.
  • print_context β€” a pre-existing print context. yes, it already exists, we're not making a new one.
  • width β€” returns the pixel width of the page currently selected in the print context.
  • height β€” returns the pixel height of the page currently selected in the print context.
  • reproducible_area β€” returns the net reproducible area of the page currently selected in the print context, expressed in pixel offsets and dimensions.

πŸ’… DESCRIPTION πŸ’…

So XpGetPageDimensions considers the medium currently selected in the print context β€” and that medium is derived in part from default-medium, default-input-tray, input-trays-medium, content-orientation, and default-resolution β€” then returns the total width and height of the page in pixels, plus the net reproducible area within the total width and height. The net reproducible area is the portion of the page on which the printer is physically capable of placing ink. literally the printable zone, bestie. πŸ–¨οΈβœ¨

XpGetPageDimensions returns a Status of 0 on failure, or 1 on success. that's the whole vibe check.

🚨 DIAGNOSTICS 🚨

  • XPBadContext β€” a valid print context-id has not been set prior to making this call.

signed off by X Version 11, libXp 1.0.4, and XpGetPageDimensions(3Xp) 🫢 β€” the footer didn't give us a date, so no invented date here, periodt. πŸ’œ

πŸ“¦ where this page comes from