Skip to content

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

@waitingdian

Description

@waitingdian
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,
]; 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions