PhantomJS AWS浏览器选项卡标题 [英] PhantomJS AWS Browser Tab Title
问题描述
我的浏览器标签标题有问题.
I have a problem with my browser tab title.
实际上,在我的网站上,我使用PhantomJS生成了一些报告,并将其拉到AWS S3存储桶上.我使用类似这样的链接访问它们: http://192.168.33.120/report/8 /1?export = inline
Actually on my website I generate some report using PhantomJS and pull them on a AWS S3 Bucket. I access to them using some link like that : http://192.168.33.120/report/8/1?export=inline
问题是我的浏览器选项卡标题是:1还是1?export = inline,它显示的是URL,而不是我的PDF文件名.
The problem is that my Browser tab titles are like : 1 or 1?export=inline, it display the url and not my PDF file name.
使用PhantomJS设置诸如title之类的属性或其他类似方法以指定要在浏览器视图上显示的标题是否可能?
Is that possible using PhantomJS to set a property like title or other think like that to specify the title that I want to show on browser view ?
推荐答案
无法显式设置渲染的PDF的标题. document.title
也不用于PDF标题.虽然 qpdfwriter .h具有setTitle
函数.您可以根据需要在GitHub上发布功能请求以公开此功能.
The title of the rendered PDF cannot be explicitly set. document.title
is also not used for the PDF title. Although, qpdfwriter.h has a setTitle
function. You can issue a feature-request on GitHub to expose this function if you like.
您还可以通过选择适当的URL来简单地为报告命名.这样,PDF标题将不再存在.
You can also simply name your reports appropriately by selecting good URLs. That way the PDF title will be a non-issue.
这篇关于PhantomJS AWS浏览器选项卡标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!