You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用@react-pdf/renderer 3.0.0加载图片报错:ctx.embedImage is not a function

从public目录加载图片时触发错误

尝试从public目录加载图片时出现以下问题:

代码片段

代码片段

图片目录结构

图片目录

运行错误

错误提示:TypeError: ctx.embedImage is not a function
报错结果

内容的提问来源于stack exchange,提问作者mrllevado

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.13 16:05:30