Comments (3)
I've had a similar problem with using this element inside a paper-dialog
. My problem was eventually fixed by manually setting the dimensions of the pdf-element
when opening the dialog:
attached: function() {
var pdfElementToolbarHeight = 64;
var modal = this.$.modal;
var pdf = this.$.pdf;
modal.addEventListener("iron-overlay-opened", function() {
var style = window.getComputedStyle(modal, null);
pdf.height = parseInt(style.getPropertyValue("height")) - parseInt(style.paddingTop) - parseInt(style.paddingBottom) - pdfElementToolbarHeight;
pdf.width = parseInt(style.getPropertyValue("width")) - parseInt(style.paddingLeft) - parseInt(style.paddingRight);
pdf.instance.HEIGHT = pdf.height;
pdf.instance.WIDTH = pdf.width;
pdf.instance.loadPDF();
});
}
Does this help in your situation?
from pdf-element.
@emielbeinema thanks for sharing your solution , I will give it a try
from pdf-element.
@hyyan Have you had any luck getting your setup to work yet?
from pdf-element.
Related Issues (16)
- Page selection field allows negatives.
- Buttons missing
- pdf-element does not respond to `hidden` attribute HOT 1
- Changing the src doesn't trigger attributeChanged() HOT 5
- Download does not decode escaped characters for filename
- Question: How to auto set the height? HOT 1
- Zooming is broken if page number is initially set outside the page range.
- pdf source doesn't show up while pages and filename are shown correctly
- Question : How to clear the displayed PDF? HOT 2
- Dynamic loading of PDF file doesn't work
- paper-toolbar missing in bower.json HOT 1
- Improve button bar layout.
- remove unneccesary `setSize()` in `changePDFSource` method HOT 1
- feature: export pdf as HTML HOT 1
- ask HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdf-element.