Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using the parameter -dPDFUSEEMBEDDEDFONTS=false, characters that do not exist in the embedded fonts within the PDF still fail to print out. #130

Open
waitingdian opened this issue Dec 11, 2024 · 0 comments

Comments

@waitingdian
Copy link

let args = vec![
    "-sDEVICE=mswinpr2", // 指定为 Windows 打印设备
    "-dNOPAUSE", // 禁止暂停
    "-dNOPROMPT", // 禁止提示
    "-dBATCH", // 支持批处理模式
    "-sstdout=%stderr", // 将标准输出重定向到标准错误
    output_file_arg.as_str(),
    "-sFONTPATH=C:/Windows/Fonts", // 指定使用系统字体路径
    "-sSUBSTFONT=\"Microsoft 2222YaHei\"", // 指定使用微软雅黑作为替代字体
    "-dPDFNOCIDFALLBACK", // 禁用内置 CID 字体回退(适合中文打印需求)
    "-dPDFUSEEMBEDDEDFONTS=false", // 使用嵌入的字体
    pdf_path,
]; 
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

No branches or pull requests

1 participant