问题
I have a problem with my browser tab title.
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
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.
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 ?
回答1:
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.
You can also simply name your reports appropriately by selecting good URLs. That way the PDF title will be a non-issue.
来源:https://stackoverflow.com/questions/28725507/phantomjs-aws-browser-tab-title