Skip to content

Say what MarkdownPdfOptions.ImageLoader reads by default - #193

Merged
jeff377 merged 1 commit into
mainfrom
claude/pdf-image-loader-doc
Dec 4, 2026
Merged

jeff377 merged 1 commit into
mainfrom
claude/pdf-image-loader-doc

Conversation

@jeff377

@jeff377 jeff377 commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #192 (#188).

Without an ImageLoader, MarkdownPdf reads images as the viewer does, under AllowedImageSchemes and AllowedImageHosts (by default https images only). This is kept on purpose: a PDF, unlike an HTML page from MarkdownHtml, cannot keep an unread image as a link, so reading nothing by default would leave most hosts with PDFs that have no images.

  • XML doc: the <remarks> of MarkdownPdfOptions.ImageLoader say what is read by default, that image hosts see the request as they do when the viewer shows the document, and that a host which must read nothing passes a loader returning null.
  • README: the PDF section (en, zh-TW) says the same in one bullet.

Documentation only; no behaviour changes.

Without a loader, MarkdownPdf reads images as the viewer does, under AllowedImageSchemes and AllowedImageHosts (https
images only by default). The XML doc and the READMEs now say so, and how a host that must read nothing passes a loader
that returns null. A PDF, unlike an HTML page, has no link to fall back on for an image it does not read.
@jeff377
jeff377 enabled auto-merge (squash) December 4, 2026 08:05
@jeff377
jeff377 merged commit dd13842 into main Dec 4, 2026
12 of 14 checks passed
@jeff377
jeff377 deleted the claude/pdf-image-loader-doc branch December 4, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant