Commit Graph
90 Commits
Author SHA1 Message Date
FredApps dc32aa7ad8 ci: give runs outside pull requests their own concurrency group 2026-11-10 14:51:54 +01:00
FredApps 0a6a76a0c4 ci: test each change once, cancel superseded PR runs, cache from main 2026-11-10 11:10:43 +01:00
FredApps 3c978dfcf3 Merge pull request #3 from carpaaaaa/fix/trim-xsd-integer
fix: accept whitespace around xsd:integer values
2026-11-10 01:17:32 +01:00
FredApps f08937dc13 Merge pull request #12 from lee-cyrille-maskell/fix/qname-value-prefix
fix(ticket): write QName values as prefix:local
2026-11-10 01:17:25 +01:00
FredApps c795b80739 Merge branch 'main' into fix/trim-xsd-integer 2026-11-10 00:58:38 +01:00
FredApps cf15d9eaa7 Merge branch 'main' into fix/qname-value-prefix 2026-11-10 00:58:36 +01:00
FredApps 11eb6677aa Merge pull request #19 from mertan-wq/fix/render-at-job-resolution
win-pdf: render PDF pages at the job's resolution, not ~96 dpi
2026-11-10 00:57:58 +01:00
6f3012df5d fix(win-pdf): render PDF pages at the job resolution
Without a destination size, Windows.Data.Pdf draws each page at its size in DIPs, so whatever it
rasterizes (images, Type 3 glyphs, transparency groups) reaches the sheet at about 96 dpi,
whatever the driver's resolution. Read the resolution from the job's DEVMODE (ignoring a negative
DMRES_* quality level in dmPrintQuality), set it on the Direct2D context, render each page at that
many pixels and scale the result back to the page size by its final pixel size.

This ports upstream ArcticLampyrid/winprint.rs 9819158, a4da89b and 5d49639 (released in 0.3.x)
onto this fork's stream loader and multi-threaded factory. It leaves out a4da89b's scopeguard
around job setup: DxgiPrintContext's Drop already cancels an unfinished job here.

Co-Authored-By: ArcticLampyrid <ArcticLampyrid@outlook.com>
Co-Authored-By: Justin Capella <4584655+b1tninja@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:11:09 +03:00
skylar taylor-barrick ea03a9df95 Merge pull request #15 from songzhihui/fix/pdf-stream-loading
fix: load PDF print jobs on demand through a read-only file stream
2026-11-08 17:38:38 +01:00
Zhihui Song 51934db382 docs: record the PDF loading timeout and lifetime limitations 2026-11-08 18:53:41 +08:00
Zhihui Song 800a6f9fd7 test: bound native tail reads instead of waiting indefinitely in DataReader 2026-11-08 18:41:10 +08:00
Zhihui Song 03a4fb6387 fix: clarify path validation and clean up Windows stream tests safely 2026-11-08 00:05:46 +08:00
Zhihui Song b334ebbbfe fix: read PDF jobs on demand through a read-only file stream 2026-11-07 15:05:34 +08:00
Zhihui Song 17f5f1e3c5 fix: load Windows PDF print jobs through a stream 2026-11-07 14:12:05 +08:00
skylar taylor-barrick 64e7afd4d1 Merge pull request #11 from cart2notasmn-ops/fix/d2d-multithreaded-factory
fix: create the Direct2D factory multi-threaded for Windows.Data.Pdf
2026-11-05 00:29:00 +01:00
Lee Maskell (PLT)andClaude Opus 5.5 cbffb07d78 fix(ticket): write QName values as prefix:local
PropertyValue::QName was written with OwnedName's Display, which puts
the namespace URI in front ("{uri}psk:LongEdgeFirst"). That is not a
valid QName, so PTMergeAndValidatePrintTicket rejects any delta ticket
carrying a QName value copied from a driver's PrintCapabilities with
0x80040005 (E_DELTA_PRINTTICKET_FORMAT). The Microsoft IPP Class
Driver lists Letter, A4 and Executive with such a property, so
printing those sizes fails (storytold/pdfcraft#3823).

Write the value as prefix:local, and declare the value's prefix on the
root so a namespace used only in a value stays bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:23:11 -06:00
cart2notasmn-opsandClaude Opus 5.5 f256775bec fix: create the Direct2D factory multi-threaded for Windows.Data.Pdf
Windows.Data.Pdf renders a page on several worker threads that share the
device context passed to RenderPageToDeviceContext. With a single-threaded
factory Direct2D takes no locks, so those threads race inside d2d1.dll:
access violations reading near null (d2d1.dll+0x93fd4, address 0x338) or
executing freed memory (BEX64), mostly on long jobs of scanned pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 12:31:35 -03:00
carpaaaaaandClaude Opus 5.5 2390a37de4 fix: accept whitespace around xsd:integer values
xsd:integer collapses whitespace, so a value such as " 16900 " is valid.
Toshiba's "Universal Printer 2" driver emits such values in its
PrintCapabilities, and the reader rejected the whole document with
"Invalid integer", so PrintCapabilities::fetch failed for these printers
(storytold/pdfcraft#2430).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:14:53 +02:00
skylar taylor-barrick d1dc3c2089 Merge pull request #1: safe shared RGB/GDI driver transport
Expose safe shared RGB/GDI driver transport
2026-10-13 22:20:17 -06:00
skylartaylor 0fc13c0708 Run adapter qualification on the review branch 2026-10-13 03:19:54 +02:00
skylartaylor 417ac3c4d1 Respect driver validity flags when checking manual copies 2026-10-13 02:29:57 +02:00
skylartaylor c32b8e7172 Add safe shared Windows RGB driver transport 2026-10-13 02:11:56 +02:00
skylar taylor-barrick 5f80b9baf6 feat: report PDF page total before processing 2026-10-12 23:08:56 +02:00
skylar taylor-barrick 3c60c53482 fix: propagate DXGI terminal failures and report PDF page processing 2026-10-12 23:08:35 +02:00
ArcticLampyrid 406ed733f1 release: v0.2.1 v0.2.1 2026-06-01 18:13:53 +08:00
ArcticLampyridandCopilot 049b90e1c9 perf(test-utils): prefer to use -InputObject instead of -Name, avoiding double searching
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 03:44:06 +08:00
ArcticLampyrid 40210f4872 fix(test-utils): canonicalize file path 2026-04-26 03:44:06 +08:00
ArcticLampyrid cf83253d8f test: add visual regression test 2026-04-26 03:44:06 +08:00
ArcticLampyrid 68fb7b3acb fix(test-in-windows-vm): collect exit code correctly 2026-04-26 03:44:06 +08:00
ArcticLampyrid cc4826764d chore: upgrade dependencies 2026-04-25 03:20:33 +08:00
ArcticLampyrid fba35cfc91 feat(test_utils): file printer device (#11) 2026-04-25 02:13:39 +08:00
ArcticLampyrid 774996a59b feat: add Chromium-style safe EMF playback 2026-04-22 03:21:29 +08:00
ArcticLampyridandTATSUNO “Taz” Yasuhiro a61a99ff11 feat: align with Chromium's behavior for GDI printing initialization
Co-authored-by: TATSUNO “Taz” Yasuhiro <ytatsuno.jp@gmail.com>
2026-04-21 02:18:15 +08:00
ArcticLampyrid 4b280cad03 chore: configure target in vscode 2026-04-21 02:05:14 +08:00
ArcticLampyrid d91ffac4b8 build: verify pdfium downloads with sigstore 2026-04-21 02:05:14 +08:00
ArcticLampyridandClaude Sonnet 4.6 b303b9f0ad fix: avoid TOCTOU race in printer enumeration by retrying on insufficient buffer
Replace the probe-then-fetch pattern with a grow-on-demand loop: start with a
null buffer and reallocate whenever EnumPrintersW returns ERROR_INSUFFICIENT_BUFFER,
so a printer list change between the two calls no longer causes a failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 02:05:14 +08:00
ArcticLampyrid 1646ac4be9 feat: add utils powered by KVM & Vagrant for testing in Windows VM 2026-04-21 02:05:14 +08:00
TATSUNO “Taz” Yasuhiro 80f9285ff4 feat: allow overriding pdfium build_id via WINPRINT_PDFIUM_BUILD_ID env var (#9) 2026-04-16 00:48:42 +08:00
ArcticLampyrid a80430d175 release: v0.2.0 v0.2.0 2024-08-30 02:03:13 +08:00
ArcticLampyrid 8ebd2a2593 feat: add PageImageableSize for fetching imageable size 2024-08-29 05:17:49 +08:00
ArcticLampyrid b96fa1ec44 feat: fetch capabilities for given ticket 2024-08-29 04:33:33 +08:00
ArcticLampyrid 6d92ece705 feat: add utility to specify copies (#1) 2024-08-16 00:09:29 +08:00
ArcticLampyrid a4c7fee2f0 feat!: remove listing DocumentDuplex as I never fetch it.
.NET do not provide support for listing it either.
2024-08-15 23:47:40 +08:00
ArcticLampyrid fd85c2eedd feat: image printer 2024-08-15 16:22:34 +08:00
ArcticLampyrid 4ab5855fcc refactor: move dxgi print logic into seperated mod for reusage 2024-08-15 16:20:01 +08:00
ArcticLampyrid 84f1daa394 fix: set proper dpi for DirectX render 2024-07-10 18:19:27 +08:00
ArcticLampyrid 562466caca feat: add Windows.Data.Pdf backend for pdf printing 2024-07-08 07:27:53 +08:00
ArcticLampyrid 39241a7247 chore: migrate lazy_static to OnceLock 2024-06-22 07:23:07 +08:00
ArcticLampyrid e63c0c7e51 chore: update dependencies 2024-06-22 07:10:37 +08:00
ArcticLampyrid 4747cc7dbd fix!: use plural form in capabilities for option packs listing 2024-06-22 02:34:30 +08:00