基于区块链的毕业设计PDF.js viewer with Hypothesis – PDF.js文件有假设的观众

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计PDF.js viewer with Hypothesis – PDF.js文件有假设的观众 是一篇很好的国外资料

This project was created for educational purpose as a course reading group project. I adapted the pdf.js-hypothesis code as documented below.

PDF.js viewer with Hypothesis

A web PDF viewer (PDF.js) with Hypothesis added.

This is a copy of Mozilla’s PDF.js viewer with Hypothesis annotation tools added.

When to use this project

If you want to embed or link to a PDF on your site with annotation using Hypothesis enabled, the easiest way is using our proxy server: https://via.hypothes.is/<PDF URL>.

For example, to embed a PDF on your site using Hypothesis, you can add an HTML snippet such as the following to your page:

<iframe width="800" height="600" src="https://via.hypothes.is/https://publisher.com/article.pdf"> </iframe>

There are situations where the proxy server may not be suitable:

  • If the PDF is not publicly accessible (for example, it is behind a paywall, requires a login or is on a corporate intranet)
  • If you want to make customizations to the PDF viewer (for example, to add custom analytics scripts or change the configuration of the Hypothesis client)
  • If you are running your own instance of the Hypothesis annotation server

If any of the above apply, this project may be useful.

To use it, add the files from this repository to your site and embed or link to viewer/web/viewer.html?file=<PDF URL>.

Usage

Clone this repository, then run:

# Navigate to the project's root directory cd pdf.js-hypothes.is  # If using Python 2, start a simple HTTP server... python -m SimpleHTTPServer # ...or if using Python 3 python -m http.server 8000  # Then run the command below or navigate to the URL in your browser open http://localhost:8000/viewer/web/viewer.html

The default PDF should render and the Hypothesis annotation tools will appear when you select text.

Viewing Your Own PDFs

The viewer/web/viewer.html file supports a file query parameter which specifies the URL of a PDF to load. This PDF must either be hosted on the same origin or be served with appropriate headers that allow it to be loaded from the viewer’s origin.

For example:

http://localhost:8000/web/viewer.html?file=%2Fyourpdf.pdf 

%2F is the URL escaped form of /–so this assumes you have a yourpdf.pdf file hosted at http://localhost:8000/

License

The PDF.js files in viewer/ are licensed under the Apache License 2.0.

The Hypothesis annotation tools are loaded from the public service at https://hypothes.is, so there’s no additional licensing needed. See the hypothesis/h project if you’d like to host your own.


这个项目是为教育目的而创建的,是一个课程阅读小组项目。我改编了pdf.js文件-假设代码如下。

PDF.js文件具有假设的查看器

web PDF查看器(PDF.js文件)加上假设。

这是Mozilla的PDF.js文件添加了假设注释工具的查看器。

何时使用此项目

如果您想在站点上嵌入或链接到启用了假设的批注的PDF,最简单的方法是使用我们的代理服务器:https://via.hypoth.is/&lt;PDFURL&gt;。

例如,要使用假设在站点中嵌入PDF,可以在页面中添加如下HTML片段:

<iframe width="800" height="600" src="https://via.hypothes.is/https://publisher.com/article.pdf"> </iframe>

代理服务器可能不适用于某些情况:

  • 如果PDF无法公开访问(例如,它位于付费墙后面,需要登录或在公司内部网上)
  • 如果您要对PDF查看器进行自定义(例如,添加自定义分析脚本或更改假设客户端的配置)
  • 如果您正在运行自己的假设批注服务器实例

如果上述任何一种情况适用,则此项目可能有用。

若要使用它,请将此存储库中的文件添加到您的网站,并嵌入或链接到查看器/web/查看器.html?文件=&lt;PDF URL&gt;。

用法

克隆此存储库,然后运行:

# Navigate to the project's root directory cd pdf.js-hypothes.is  # If using Python 2, start a simple HTTP server... python -m SimpleHTTPServer # ...or if using Python 3 python -m http.server 8000  # Then run the command below or navigate to the URL in your browser open http://localhost:8000/viewer/web/viewer.html

当您选择文本时,将呈现默认的PDF,并显示假设注释工具。

查看您自己的PDF

浏览器/web/查看器.html文件支持文件查询参数,该参数指定要加载的PDF的URL。此PDF必须托管在同一个源上,或者提供适当的头文件,以便从查看器的源加载。

例如:

http://localhost:8000/web/viewer.html?file=%2Fyourpdf.pdf 

%2F是/–的URL转义形式,因此假设您有你的pdf.pdf文件托管位置http://localhost:8000/

许可证

PDF.js文件viewer/中的文件是根据Apache许可证2.0授权的。

假设注释工具从https://假想网,因此不需要额外的许可。如果您想主持自己的项目,请参阅假设/h项目。

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/19820.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计PDF.js viewer with Hypothesis – PDF.js文件有假设的观众

提供最优质的资源集合

立即查看 了解详情