承接 anglemx/pdf-viewer-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

anglemx/pdf-viewer-bundle

最新稳定版本:v1.0

Composer 安装命令:

composer require anglemx/pdf-viewer-bundle

包简介

PDF In-browser viewer based on PDF.js

README 文档

README

PDF in-browser viewer using the PDF.js library to render documents with HTML5.

Current build using PDF.js release v4.0.379.

Installation

Install composer dependency:

composer require anglemx/pdf-viewer-bundle

Make sure that the Bundle has been enabled and auto-wired in the bundles.php file.

// config/bundles.php

return [
    // ...
    Angle\PDFViewerBundle\AnglePDFViewerBundle::class => ['all' => true],
    // ...
];

Configure routing

As per the official Symfony documentation:

Routing is never automatically imported in Symfony.

This means that your application will need to explicitly import the routes to enable the bundle's controller.

angle_pdf_viewer:
  resource: "@AnglePDFViewerBundle/Resources/config/routes.yaml"

Usage

return $this->redirectToRoute('angle_pdf_viewer_view', ['file' => '/path/to/file']);
<a href="{{ path('angle_pdf_viewer_view', {'file': '/path/to/file'}) }}">View PDF</a>

Quick Test

Try to access the following URL after installing:

/_pdf?file=/bundles/anglepdfviewer/vendor/pdfjs/web/compressed.tracemonkey-pldi-09.pdf

统计信息

  • 总下载量: 48
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: Twig

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-28