pdf两个技能,缩略图和更改标题

1、在打开pdf时,有时是不是会产生这样现象?打开的文件标题不是pdf的名字

最常见的是从datasheet这个网站下载的芯片手册会出现这个情况。

让他保持一致很简单,用txt方式打开pdf文档,将/Title 后面括号的内容删掉保存即可。不需要第三方额外工具!

2、pdf产生鸟图效果:

上图左面已经展示了,鸟图效果,这样可以拖动查看pdf大页面的内容比较方便

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
WIN7 X64 PDF缩略图 补丁软件 Introduction: This page contains simple fixes for Adobe's PDF preview handler and thumbnails on 64-bit versions of Windows. Before I looked into this, people had been complaining about it for over two years with no official response. Only the thumbnails fix is still needed, except if you upgraded from Vista to Windows 7, where both fixes may still be needed. Half a year after I published the information, Adobe finally incorporated the preview handler fix (but no thumbnails fix, and they leave the preview handler broken if you upgraded from Vista to Windows 7) into the installer for Adobe Reader 9.3.2 (April 2010). Maybe in 2011 Adobe will manage to fix the thumbnails as well; until then you can get my fix for them below. :-) Preview Handler Preview handlers are lightweight components which let you view various file types within programs like Windows Explorer (in Windows Vista and Windows 7), Outlook 2007/2010 and Directory Opus (via my bundled plugin). Adobe Reader comes with Adobe's PDF preview handler but the installer had a mistake which meant the preview handler did not work on 64-bit systems. It turned out the problem could be fixed via a simple registry change. The change is described below and a small program which performs the fix is also provided for your convenience. Unlike the thumbnail fix, described below, the preview handler fix should no longer be needed by most people, since Adobe have finally fixed their installer, but it's still provided in case it helps repair things. If you had Adobe Reader installed under Vista and later upgraded to Windows 7 then you will probably still need to run the preview handler fix once to clean up a registry value which Adobe set inconsistently between the two OS versions. If in doubt, run the fix and it will tell you if anything needs to be done. If everything is good already then the preview handler fix won't change anything.
可以使用 PDF.js 库来实现在 Vue 中预览 PDF 并显示缩略图。具体实现步骤如下: 1. 安装 pdfjs-dist 和 vue-pdf 依赖: ``` npm install pdfjs-dist vue-pdf --save ``` 2. 在 Vue 组件中引入依赖: ```javascript import pdfjsLib from 'pdfjs-dist'; import VuePdf from 'vue-pdf'; ``` 3. 在组件中使用 VuePdf 组件,并设置 props: ```html <template> <div> <vue-pdf :src="pdfUrl" :page="currentPage" @num-pages="numPages = $event"></vue-pdf> <div v-for="i in numPages" :key="i"> <img :src="`data:image/jpeg;base64,${thumbnails[i - 1]}`" /> </div> </div> </template> <script> export default { components: { VuePdf, }, data() { return { pdfUrl: 'https://example.com/example.pdf', currentPage: 1, numPages: 0, thumbnails: [], }; }, methods: { async generateThumbnails() { const pdf = await pdfjsLib.getDocument(this.pdfUrl).promise; for (let i = 1; i <= this.numPages; i++) { const page = await pdf.getPage(i); const viewport = page.getViewport({ scale: 0.5 }); const canvas = document.createElement('canvas'); const canvasContext = canvas.getContext('2d'); canvas.height = viewport.height; canvas.width = viewport.width; await page.render({ canvasContext, viewport }).promise; const thumbnail = canvas.toDataURL('image/jpeg'); this.thumbnails.push(thumbnail.split(',')[1]); } }, }, mounted() { this.generateThumbnails(); }, }; </script> ``` 在上面的代码中,我们使用了 VuePdf 组件来预览 PDF,同时使用了 PDF.js 库来生成缩略图。在 mounted 钩子函数中调用 generateThumbnails 方法来生成缩略图,并将缩略图数据存储在 thumbnails 数组中。在模板中使用 v-for 循环渲染缩略图

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值