[原][工具][C++]调用adobe reader打开pdf,通过命令行启动pdf


百度网盘: adobe reader 11

命令行:

AdobeReaderXIPortable.exe D:\XXX.pdf

 通过C++在windows下打开pdf:

    PROCESS_INFORMATION processInfo;
    STARTUPINFO startupInfo;
    ::ZeroMemory(&startupInfo, sizeof(startupInfo));
    startupInfo.cb = sizeof(startupInfo);
    QString fileName = QString::fromLocal8Bit("xxx.pdf");
    fileName = QString::fromLocal8Bit("E:/软件/adobe_reader11/AdobeReaderXIPortable.exe ") + fileName;
    std::string _file = fileName.toLocal8Bit();
    CreateProcess(NULL, (CHAR*)_file.c_str(),
        NULL,  // process security
        NULL,  // thread security
        FALSE, // no inheritance
        0,     // no startup flags
        NULL,  // no special environment
        NULL,  // default startup directory
        &startupInfo,
        &processInfo);

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM