Version Description
Download this release
Release Info
Developer | levertechadmin |
Plugin | PDF Embedder |
Version | 4.1 |
Comparing to | |
See all releases |
Code changes from version 4.0 to 4.1
- core/core_pdf_embedder.php +2 -2
- css/pdfemb-embed-pdf.css +56 -6
- js/pdfemb-blocks.js +10 -10
- pdf_embedder.php +2 -2
- readme.txt +9 -5
core/core_pdf_embedder.php
CHANGED
@@ -645,7 +645,7 @@ class core_pdf_embedder {
|
|
645 |
wp_enqueue_style(
|
646 |
'pdfemb-gutenberg-block-css', // Handle.
|
647 |
$this->my_plugin_url(). 'css/pdfemb-blocks.css', // editor.css: This file styles the block within the Gutenberg editor.
|
648 |
-
array( 'wp-edit-blocks' ), // Dependencies, defined above.
|
649 |
$this->PLUGIN_VERSION
|
650 |
);
|
651 |
}
|
@@ -654,7 +654,7 @@ class core_pdf_embedder {
|
|
654 |
wp_enqueue_style(
|
655 |
'pdfemb-gutenberg-block-backend-js', // Handle.
|
656 |
$this->my_plugin_url(). 'css/pdfemb-blocks.css', // style.css: This file styles the block on the frontend.
|
657 |
-
array( 'wp-blocks' ), // Dependencies, defined above.
|
658 |
$this->PLUGIN_VERSION
|
659 |
);
|
660 |
}
|
645 |
wp_enqueue_style(
|
646 |
'pdfemb-gutenberg-block-css', // Handle.
|
647 |
$this->my_plugin_url(). 'css/pdfemb-blocks.css', // editor.css: This file styles the block within the Gutenberg editor.
|
648 |
+
//array( 'wp-edit-blocks' ), // Dependencies, defined above.
|
649 |
$this->PLUGIN_VERSION
|
650 |
);
|
651 |
}
|
654 |
wp_enqueue_style(
|
655 |
'pdfemb-gutenberg-block-backend-js', // Handle.
|
656 |
$this->my_plugin_url(). 'css/pdfemb-blocks.css', // style.css: This file styles the block on the frontend.
|
657 |
+
//array( 'wp-blocks' ), // Dependencies, defined above.
|
658 |
$this->PLUGIN_VERSION
|
659 |
);
|
660 |
}
|
css/pdfemb-embed-pdf.css
CHANGED
@@ -9,8 +9,49 @@ div.pdfemb-viewer {
|
|
9 |
text-align: left;
|
10 |
direction: ltr;
|
11 |
background-color: lightGrey;
|
|
|
12 |
}
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
div.pdfemb-inner-div {
|
15 |
overflow: hidden;
|
16 |
line-height: 1;
|
@@ -87,7 +128,7 @@ div.pdfemb-wantmobile-fsarea {
|
|
87 |
cursor: -moz-grabbing;
|
88 |
cursor: grabbing;
|
89 |
|
90 |
-
z-index: 50000;
|
91 |
}
|
92 |
|
93 |
div.pdfemb-loadingmsg {
|
@@ -133,7 +174,7 @@ div.pdfemb-toolbar-top {
|
|
133 |
div.pdfemb-toolbar-bottom {
|
134 |
bottom: 0px;
|
135 |
left: 0px;
|
136 |
-
|
137 |
}
|
138 |
|
139 |
div.pdfemb-toolbar button, div.pdfemb-toolbar button[disabled] {
|
@@ -330,7 +371,7 @@ input.pdfemb-page-num {
|
|
330 |
height: 100%;
|
331 |
}
|
332 |
|
333 |
-
.pdfembAnnotationLayer .linkAnnotation > a
|
334 |
background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat;
|
335 |
border: none;
|
336 |
opacity: 0;
|
@@ -412,14 +453,22 @@ input.pdfemb-page-num {
|
|
412 |
}
|
413 |
|
414 |
.pdfemb-pagescontainer {
|
415 |
-
overflow:
|
416 |
display: block;
|
417 |
position: relative;
|
418 |
background-color: lightGrey;
|
419 |
}
|
420 |
|
|
|
|
|
|
|
421 |
|
422 |
-
|
|
|
|
|
|
|
|
|
|
|
423 |
|
424 |
@media screen and (min-color-index:0)
|
425 |
and(-webkit-min-device-pixel-ratio:0) { @media
|
@@ -427,4 +476,5 @@ and(-webkit-min-device-pixel-ratio:0) { @media
|
|
427 |
.pdfemb-pagescontainer {
|
428 |
margin-left: 1px;
|
429 |
}
|
430 |
-
}
|
|
9 |
text-align: left;
|
10 |
direction: ltr;
|
11 |
background-color: lightGrey;
|
12 |
+
touch-action: none;
|
13 |
}
|
14 |
|
15 |
+
|
16 |
+
/* new code start */
|
17 |
+
|
18 |
+
/* Fix for bouncing behaviour when scrolling on mobile devices */
|
19 |
+
div.pdfemb-viewer{
|
20 |
+
touch-action: none;
|
21 |
+
}
|
22 |
+
canvas.pdfemb-the-canvas {
|
23 |
+
touch-action: none;
|
24 |
+
}
|
25 |
+
@media only screen and (min-width:375px) and (max-width: 1200px){
|
26 |
+
.pdfemb-pagescontainer{
|
27 |
+
overflow: scroll !important;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
.pdfemb-inner-div {
|
33 |
+
background-color: white !important;
|
34 |
+
}
|
35 |
+
|
36 |
+
a@media only screen and (min-width:375px) and (max-width: 768px){
|
37 |
+
div.pdfemb-toolbar div {
|
38 |
+
margin: 6px 5px 6px 2px !important;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
/* Hide text shadow */
|
43 |
+
.textLayer.pdfembTextLayer div {
|
44 |
+
display: none !important;
|
45 |
+
}
|
46 |
+
|
47 |
+
/* Hide an embedded PDF on Print */
|
48 |
+
@media print {
|
49 |
+
div.pdfemb-viewer {
|
50 |
+
display: none !important;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
/* new code end */
|
54 |
+
|
55 |
div.pdfemb-inner-div {
|
56 |
overflow: hidden;
|
57 |
line-height: 1;
|
128 |
cursor: -moz-grabbing;
|
129 |
cursor: grabbing;
|
130 |
|
131 |
+
z-index: 50000; / should be higher than anything else in PDF.js! /
|
132 |
}
|
133 |
|
134 |
div.pdfemb-loadingmsg {
|
174 |
div.pdfemb-toolbar-bottom {
|
175 |
bottom: 0px;
|
176 |
left: 0px;
|
177 |
+
/ padding-top: 1px; /
|
178 |
}
|
179 |
|
180 |
div.pdfemb-toolbar button, div.pdfemb-toolbar button[disabled] {
|
371 |
height: 100%;
|
372 |
}
|
373 |
|
374 |
+
.pdfembAnnotationLayer .linkAnnotation > a / -ms-a / {
|
375 |
background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7") 0 0 repeat;
|
376 |
border: none;
|
377 |
opacity: 0;
|
453 |
}
|
454 |
|
455 |
.pdfemb-pagescontainer {
|
456 |
+
overflow: scroll !important;
|
457 |
display: block;
|
458 |
position: relative;
|
459 |
background-color: lightGrey;
|
460 |
}
|
461 |
|
462 |
+
.pdfemb-pagescontainer::-webkit-scrollbar {
|
463 |
+
display: none;
|
464 |
+
}
|
465 |
|
466 |
+
.pdfemb-pagescontainer { -ms-overflow-style: none; }
|
467 |
+
|
468 |
+
.pdfemb-pagescontainer { overflow: -moz-scrollbars-none; }
|
469 |
+
|
470 |
+
|
471 |
+
/ Safari 6.1+ (9.0 is the latest version of Safari at this time) /
|
472 |
|
473 |
@media screen and (min-color-index:0)
|
474 |
and(-webkit-min-device-pixel-ratio:0) { @media
|
476 |
.pdfemb-pagescontainer {
|
477 |
margin-left: 1px;
|
478 |
}
|
479 |
+
}
|
480 |
+
}
|
js/pdfemb-blocks.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*
|
2 |
* Gutenberg block Javascript code
|
3 |
*/
|
4 |
-
var
|
5 |
var createElement = wp.element.createElement; // The wp.element.createElement() function to create elements.
|
6 |
var registerBlockType = wp.blocks.registerBlockType; // The registerBlockType() function to register blocks.
|
7 |
|
@@ -25,7 +25,7 @@
|
|
25 |
registerBlockType(
|
26 |
'pdfemb/pdf-embedder-viewer', // Block name. Must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
27 |
{
|
28 |
-
title:
|
29 |
icon: 'media-document', // Block icon from Dashicons. https://developer.wordpress.org/resource/dashicons/.
|
30 |
category: 'common', // Block category. Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
31 |
attributes: {
|
@@ -112,7 +112,7 @@
|
|
112 |
createElement(
|
113 |
'p',
|
114 |
{},
|
115 |
-
|
116 |
),
|
117 |
createElement(
|
118 |
'hr',
|
@@ -121,12 +121,12 @@
|
|
121 |
createElement(
|
122 |
'p',
|
123 |
{},
|
124 |
-
|
125 |
),
|
126 |
createElement(
|
127 |
TextControl,
|
128 |
{
|
129 |
-
label:
|
130 |
value: attributes.width,
|
131 |
onChange: onChangeWidth
|
132 |
}
|
@@ -134,7 +134,7 @@
|
|
134 |
createElement(
|
135 |
TextControl,
|
136 |
{
|
137 |
-
label:
|
138 |
value: attributes.height,
|
139 |
onChange: onChangeHeight
|
140 |
}
|
@@ -142,7 +142,7 @@
|
|
142 |
createElement(
|
143 |
SelectControl,
|
144 |
{
|
145 |
-
label:
|
146 |
value: attributes.toolbar,
|
147 |
options: [
|
148 |
{ label: 'Top', value: 'top' },
|
@@ -156,11 +156,11 @@
|
|
156 |
createElement(
|
157 |
RadioControl,
|
158 |
{
|
159 |
-
label:
|
160 |
selected: attributes.toolbarfixed,
|
161 |
options: [
|
162 |
-
{ label:
|
163 |
-
{ label:
|
164 |
],
|
165 |
onChange: onChangeToolbarfixed
|
166 |
}
|
1 |
/*
|
2 |
* Gutenberg block Javascript code
|
3 |
*/
|
4 |
+
var _ = wp.__nx; // The _() function for internationalization.
|
5 |
var createElement = wp.element.createElement; // The wp.element.createElement() function to create elements.
|
6 |
var registerBlockType = wp.blocks.registerBlockType; // The registerBlockType() function to register blocks.
|
7 |
|
25 |
registerBlockType(
|
26 |
'pdfemb/pdf-embedder-viewer', // Block name. Must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
27 |
{
|
28 |
+
title: 'PDF Embedder', // Block title. __() function allows for internationalization.
|
29 |
icon: 'media-document', // Block icon from Dashicons. https://developer.wordpress.org/resource/dashicons/.
|
30 |
category: 'common', // Block category. Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
31 |
attributes: {
|
112 |
createElement(
|
113 |
'p',
|
114 |
{},
|
115 |
+
'Change the Height & Width of the PDF',
|
116 |
),
|
117 |
createElement(
|
118 |
'hr',
|
121 |
createElement(
|
122 |
'p',
|
123 |
{},
|
124 |
+
'Enter max or an integer number of pixels.'
|
125 |
),
|
126 |
createElement(
|
127 |
TextControl,
|
128 |
{
|
129 |
+
label: 'Width',
|
130 |
value: attributes.width,
|
131 |
onChange: onChangeWidth
|
132 |
}
|
134 |
createElement(
|
135 |
TextControl,
|
136 |
{
|
137 |
+
label: 'Height',
|
138 |
value: attributes.height,
|
139 |
onChange: onChangeHeight
|
140 |
}
|
142 |
createElement(
|
143 |
SelectControl,
|
144 |
{
|
145 |
+
label: 'Toolbar Location',
|
146 |
value: attributes.toolbar,
|
147 |
options: [
|
148 |
{ label: 'Top', value: 'top' },
|
156 |
createElement(
|
157 |
RadioControl,
|
158 |
{
|
159 |
+
label: 'Toolbar Hover',
|
160 |
selected: attributes.toolbarfixed,
|
161 |
options: [
|
162 |
+
{ label: 'Toolbar appears only on hover over document', value: 'off' },
|
163 |
+
{ label: 'Toolbar always visible ', value: 'on' }
|
164 |
],
|
165 |
onChange: onChangeToolbarfixed
|
166 |
}
|
pdf_embedder.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: PDF Embedder
|
5 |
* Plugin URI: http://wp-pdf.com/
|
6 |
* Description: Embed PDFs straight into your posts and pages, with flexible width and height. No third-party services required. Compatible with Gutenberg Editor WordPress
|
7 |
-
* Version: 4.
|
8 |
* Author: Dan Lester
|
9 |
* Author URI: http://wp-pdf.com/
|
10 |
* License: GPL3
|
@@ -15,7 +15,7 @@ require_once( plugin_dir_path(__FILE__).'/core/core_pdf_embedder.php' );
|
|
15 |
|
16 |
class pdfemb_basic_pdf_embedder extends core_pdf_embedder {
|
17 |
|
18 |
-
protected $PLUGIN_VERSION = '4.
|
19 |
|
20 |
// Singleton
|
21 |
private static $instance = null;
|
4 |
* Plugin Name: PDF Embedder
|
5 |
* Plugin URI: http://wp-pdf.com/
|
6 |
* Description: Embed PDFs straight into your posts and pages, with flexible width and height. No third-party services required. Compatible with Gutenberg Editor WordPress
|
7 |
+
* Version: 4.1
|
8 |
* Author: Dan Lester
|
9 |
* Author URI: http://wp-pdf.com/
|
10 |
* License: GPL3
|
15 |
|
16 |
class pdfemb_basic_pdf_embedder extends core_pdf_embedder {
|
17 |
|
18 |
+
protected $PLUGIN_VERSION = '4.1';
|
19 |
|
20 |
// Singleton
|
21 |
private static $instance = null;
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== PDF Embedder ===
|
2 |
Contributors: levertechadmin, danlester
|
3 |
Tags: doc, pdf, pdf viewer, office, google, document, embed, intranet
|
4 |
-
Requires at least:
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 4.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -203,9 +203,13 @@ the Plugins section of your Wordpress admin
|
|
203 |
|
204 |
== Changelog ==
|
205 |
|
206 |
-
=
|
207 |
|
208 |
-
Added compatibility for
|
|
|
|
|
|
|
|
|
209 |
|
210 |
= 3.1.8 =
|
211 |
|
1 |
=== PDF Embedder ===
|
2 |
Contributors: levertechadmin, danlester
|
3 |
Tags: doc, pdf, pdf viewer, office, google, document, embed, intranet
|
4 |
+
Requires at least: 3.5
|
5 |
+
Tested up to: 5.2.1
|
6 |
+
Stable tag: 4.1
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
203 |
|
204 |
== Changelog ==
|
205 |
|
206 |
+
= 3.2.1 =
|
207 |
|
208 |
+
Added compatibility for Wordpress 5.2.1
|
209 |
+
|
210 |
+
= 3.2 =
|
211 |
+
|
212 |
+
Added compatibility with Gutenberg Editor
|
213 |
|
214 |
= 3.1.8 =
|
215 |
|