pdfcraft/crates
Mawfyy 33c14e07cf
Print: Windows lists its printers and spools jobs (#847)
* Print: Windows lists its printers and spools jobs (#756)

The Print dialog's printer list comes from Win32_Printer through PowerShell's
CIM (wmic is gone from Windows 11), and jobs are spooled by the embedded
windows_print.ps1: the in-box Windows.Data.Pdf renders each sheet at the
printer's own resolution and System.Drawing.Printing carries copies,
collation, duplex and colour as the job's settings. Both run through
powershell, so the Rust code touches no Win32 API. Fixes #756, with the
printer-not-showing duplicates #160, #244, #293, #465 and #644; CIM approach
from #452. On CI a paused Generic / Text Only test printer catches the job in
its queue; a parser test keeps the script valid PowerShell.

* Print: fix the Windows await helper and render the job on CI (dry run)

Real-machine testing found [System.WindowsRuntimeSystemExtensions]::GetMethods()
failing with 'does not contain a method named GetMethods': GetMethods is an
instance method of [Type], so it is called with '.', the form the canonical
WinRT-await snippets use, not '::'. The first CI run missed it because the
end-to-end test skipped silently when the runner refused the test printer, so
the script had never actually run.

The script now honours PDFCRAFT_PRINT_DRYRUN=1: render every sheet with
Windows.Data.Pdf to PNGs in the temporary folder and print nothing. The test
runs that half unconditionally, so CI exercises the whole WinRT path —
projection, await helpers, render — on any machine, while the paused-printer
half stays best-effort and prints why it skipped. Win32_Printer enumeration
asks only for Name and Default, so a machine with nine printers waits less.

* Tests: the find-options wait in the viewer test is a deadline too

4280f83 converted the frame-count waits in this test to deadlines after the
same 12-of-15 race under a full workspace test run, but left the first wait —
the one for the 'page' matches — on the old 60-frame loop, and it flaked the
same way on PR #847's CI. Same fix: wait up to 20 s for the 15 matches, then
assert.
2026-10-11 00:23:35 -04:00
..
a11y M4: bookmarks from tagged headings (organize.bookmarks-from-structure) (#754) 2026-10-10 08:25:10 -04:00
annot Drawn signatures and drawings resize from their handles (#920) 2026-10-10 17:42:20 -04:00
automation M7: select and move mixed PDF objects together (#844) (#907) 2026-10-10 17:38:34 -04:00
compare Rename PrintCraft to PdfCraft (#174) 2026-10-07 16:03:57 -04:00
content Fix #155: edit text across content stream pieces (#628) 2026-10-09 17:57:02 -04:00
cos fix(crypt): R2–R4 passwords with non-ASCII characters open (PDFDocEncoding) (#905) 2026-10-10 17:10:39 -04:00
create fix(create): read UTF-16, byte-order-marked and Windows code page text files (#903) 2026-10-10 17:07:47 -04:00
crypt fix(crypt): R2–R4 passwords with non-ASCII characters open (PDFDocEncoding) (#905) 2026-10-10 17:10:39 -04:00
edit M7: select and move mixed PDF objects together (#844) (#907) 2026-10-10 17:38:34 -04:00
engine UI: preserve shared document workspace on current main 2026-10-10 19:10:14 -06:00
export Fix #526: keep text colour in Word, HTML and RTF export (#547) 2026-10-09 10:49:21 -04:00
filters Rename PrintCraft to PdfCraft (#174) 2026-10-07 16:03:57 -04:00
fonts M7: keep embedded CMap ranges compact instead of truncating expansion (#837) 2026-10-10 17:14:24 -04:00
forms fix(forms): reject out-of-domain field flags (#701) 2026-10-10 06:03:49 -04:00
geom Rename PrintCraft to PdfCraft (#174) 2026-10-07 16:03:57 -04:00
js JavaScript: limit util.printf widths and output, and array arguments (#770) 2026-10-10 15:47:05 -04:00
measure Measure: snap to the implicit closing edge of filled paths (#803) (#862) 2026-10-10 15:05:48 -04:00
model M2: pages with /UserUnit are shown at their size in points, as in Acrobat (#722) 2026-10-10 06:19:31 -04:00
ocr OCR: a scanned euro sign reads as €, not E (#796) 2026-10-10 15:08:04 -04:00
optimize M11: Reduce file size and Optimize PDF drop images nothing draws, such as a deleted image (#894) 2026-10-10 16:21:07 -04:00
organize M4: traverse large bookmark trees lazily without dropping later items (#876) 2026-10-10 17:17:13 -04:00
platform Linux: "Use system setting" asks the desktop, not winit (#881) 2026-10-10 15:47:33 -04:00
preflight PDF/A: no sRGB output intent for CMYK documents, and pdfa_verify checks the intent's colour space (#667) (#732) 2026-10-10 06:22:47 -04:00
print Print: Windows lists its printers and spools jobs (#847) 2026-10-11 00:23:35 -04:00
redact fix(redact): the Email pattern finds internationalized addresses (#901) 2026-10-10 17:04:41 -04:00
render M4: traverse large bookmark trees lazily without dropping later items (#876) 2026-10-10 17:17:13 -04:00
sign M9: name the Windows store certificates that can't sign (#179) (#761) 2026-10-10 16:25:24 -04:00
ui-egui Print: Windows lists its printers and spools jobs (#847) 2026-10-11 00:23:35 -04:00
xfa M12: XFA rows in areas get their instances, and areas stay out of data paths (#853) 2026-10-10 16:28:29 -04:00
xfdf XFDF keeps a callout's leader, text-box inset, intent and arrowhead (#819) (#854) 2026-10-10 15:38:27 -04:00