Closed szlt5 closed 8 months ago
I currently have no plans of adding support for varying margin values.
Margins are informative for IPP Clients to know where they can place content that will be marked on a page. Raster content is still imaged for a full-bleed page so a PAPPL-based driver can simply ignore data that lies outside the printable area of a given media sheet. In the case of pappl-retrofit, I would recommend reporting the worst-case margins in the left_right
and bottom_top
members and then use the PPD-supplied imageable area when processing the raster data.
Is your feature request related to a problem? Please describe. Pappl does not allow registering individual margins per-page-size. All the page sizes share the margin stored in the structure
pappl_pr_driver_data_s.left_right
andpappl_pr_driver_data_s.bottom_top
.But for some vendor, each paper has its own margin setting, such as the PPD file posted in the https://github.com/michaelrsweet/pappl/issues/268: A4's margin is 5mm, 13x19's margin is 12.6mm.
Print 13x19 by using legacy-printer-app (pappl-retrofit), the printed image is cropped on all sides. Details of the printing as below: System Information:
OS: Ubuntu23.10
cups: 2.4.6
App: Document viewer
Test Data: TestData_13x19_0margin.pdf
Traditional printing process: [application generates a spool file with 12.6mm margin] ⇒ [cups & cups-filter generates the cups-raster data] ⇒ [The cups-raster data received by vendor filter is OK] traditional_13x19_0marigin_cupsraster.gz
The new printing process (driverless + legacy-printer-app): [application generates a spool file with 5mm margin] ⇒ [cups & cups-filter generates the image/ufr data with 5mm margin] ⇒ [pappl + pappl-retrofit generates the cups-raster data] ⇒ [The cups-raster data received by vendor filter is cropped] new_13x19_0margin.cupsraster.gz
Describe the solution you'd like Will pappl support registering individual margins per-page-size in future or is there a better idea to solve this problem?