Comments (10)
@fufjvnvnf Sure it will be supported it's just a renderer target for how react works, so you can do anything what you're used to do within your react components.
Also we make full advantage of yoga (also used in react-native and react-sketchapp in the future), so you can style your components as follows;
import React from 'react';
import { StyleSheet, Text } from '@react-pdf/core';
const styles = Stylesheet.create({
paragraph: {
color: 'grey',
fontSize: 16,
}
});
class Paragraph extends React.Component {
render() {
const { children } = this.props;
return (
<Text style={styles.Paragraph}>
{children}
</Text>
);
}
}
Hope this answers your question?
from react-pdf.
Fair enough! Sounds like reasonable prioritization. Big fan of your effort to decaffeinate pdfkit btw 🎉 Let me know if you want any assistance there.
from react-pdf.
@fufjvnvnf Like mentioned in the readme, it is stated that this project is not ready for production usage, but I'm happy that you want to try it already. The last changes within the layout calculations are not published yet. If you hit any constraints let us know.
from react-pdf.
Thank you!
Cool project jspdf-autotable.
This is an idea we played around with, but won't be available until the 1.0 version of react-pdf is released. Also this would mean that we should make some changes to pdfkit
which we use internally for the 1.0 release.
The main focus for now is to just support the primitives which are available in other react renderers like react-native
and react-sketchapp
. This would mean that there won't be native tables at this moment. But hopefully we can fix that in the future.
from react-pdf.
Agreed. I love this project. Would customized components be supported in the future? I am looking for a way to export airbnb superset's dashboards to pdf!
from react-pdf.
@fufjvnvnf would be really cool to see this project being used at the airbnb superset dashboards.
What do you mean with customized components. Text, View and SVG's will be supported within our initial release. What kind of other features do you think you will need to make full advantage of the PDF rendering.
Extensions will mean that you can make things like Video, Security (Passwords) and other things supported in the pdf spec within react-pdf.
from react-pdf.
@jbovenschen I'm a complete noob on front-end so I might've said something stupid. I was wondering if custom classes that extend React.component would be supported, i.e. if I create a pdf using your library that contains such components, will them be correctly displayed? Thank you!
from react-pdf.
@jbovenschen Hah I see! Then this is exactly what I'm looking for! Thank you very much and I will try it on my project now!
from react-pdf.
I notice this package uses yarn for install. My project however uses npm. After I installed your package, whenever I install other packages using npm, npm automatically deletes the content of your package. How should I resolve the incompatibility between the two package managers? Or do I have to migrate to yarn in order to use your package? I am also not able to run my project using your package because it keeps saying that module "fs" couldn't be found, but I've installed it using both npm and yarn. The fs directory downloaed is empty, and according to the README it's "not currently in use" anymore.
from react-pdf.
I guess you want to run the package directly in the browser with the @react-pdf/dom
package.
This is not really good supported at this moment, because of the way pdfkit
is bundled.
This is something I currently work on to support with changes in pdfkit
, this is for now not really viable.
from react-pdf.
Related Issues (20)
- How to display the Latex in pdf?
- Display the contents of a specific div in a PDF HOT 3
- Bu while rendering out a table data in a pdf
- Remove bootstrap command in the `contribution` guide
- Bookmarks all link to last page in document HOT 4
- When entering Korean text, encoding appears broken
- Hide the grey area of the PDF previewer?
- Render charts in a downloadble PDF HOT 1
- renderToStream: NodeJS.ReadableStream will not complete, end event will not fire. HOT 4
- svg strokeLinecap type is wrong
- Multiple fonts not working HOT 2
- LinearGradient Component does not allow for selecting gradient direction with x1, y1, and x2, y2
- [Fonts] Font family Times New Roman is not display, not work
- react-pdf isn't working in NextJS, getting "Module parse failed: Unexpected character '�'" error
- Does not render U+00B7 special character (∙)
- Bookmark in Pdf
- is it possible to present a table example? HOT 1
- Text stroke not working
- remaining margin/padding bottom should be removed on new page
- Nested text styling does not work on Windows HOT 3
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 react-pdf.