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

pdf生成自定义封面的问题 #147

Open
superabbite1 opened this issue Dec 7, 2021 · 4 comments
Open

pdf生成自定义封面的问题 #147

superabbite1 opened this issue Dec 7, 2021 · 4 comments

Comments

@superabbite1
Copy link

请按照一下格式提交issue,谢谢!

  1. 你当前使用的是哪个版本的 BookStack?
    2.10

  2. 你当前使用的是什么操作系统?
    ubuntu部署

  3. 你是如何操作的?
    安装的时候没有修改app.conf 文件中的puppeteer =
    后来修改了puppeteer = true

  4. 你期望得到什么结果?

  5. 当前遇到的是什么结果?

但是现在生成封面还是默认的那种 如何才能生成自定义的封面?

默认封面
Snipaste_2021-12-07_15-59-53

Snipaste_2021-12-07_15-57-01

另外我明明安装了puppeteer和chrome为什么在仪表盘里还是显示没安装
Snipaste_2021-12-07_16-01-33

打印百度页面代码的截图
Snipaste_2021-12-07_16-03-37

@superabbite1
Copy link
Author

作者大大能解答下吗

@superabbite1
Copy link
Author

image

image

自己改了下app.conf里的chrome的配置信息,现在chrome可以显示已安装了。

但是puppeteer还是不行,我自己在服务器中手动建一个index.js。内容如下。测试了下puppeteer功能是可以的

const puppeteer = require('puppeteer'); puppeteer.launch({ headless: false, // executablePath: 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe', executablePath: 'C:\\Users\\Administrator.LCHDC01.000\\node_modules\\_puppeteer@13.0.0@puppeteer\\.local-chromium\\win64-938248\\chrome-win\\chrome.exe' }).then(async browser => { const page = await browser.newPage(); await page.goto('https://www.baidu.com'); await page.screenshot({path: 'baidu.png'}); browser.close(); }).catch(err => { console.log(err); });

然后运行node index.js 可以生成图片

image

作者大大能看看为什么还是显示未安装吗

@zhudupi
Copy link

zhudupi commented Jan 7, 2022

我也出现了类似的问题,用pm2运行的Bookstack.exe就出现了puppeteer报错,双击运行的Bookstack.exe就显示安装成功。

@superabbite1
Copy link
Author

我双击运行的Bookstack.exe,也一样报错,显示未安装

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

2 participants