You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a snippet of the code from the top. You will see that this is from the demo with adjustments for our configuration.
`
import React from 'react';
import { Page, Text, View, Document, StyleSheet, Font, Image, PDFViewer } from '@react-pdf/renderer';
import logoone from "../../images/getTransactions-logo-400px.png";
import badactor from "../../images/crypto-scam-bad-actor.jpg";
// Save in a file
// import ReactPDF from '@react-pdf/renderer';
// ReactPDF.render(, ${__dirname}/example.pdf);
// Render to a stream
// import ReactPDF from '@react-pdf/renderer';
// ReactPDF.renderToStream();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Here is a snippet of the code from the top. You will see that this is from the demo with adjustments for our configuration.
`
import React from 'react';
import { Page, Text, View, Document, StyleSheet, Font, Image, PDFViewer } from '@react-pdf/renderer';
import logoone from "../../images/getTransactions-logo-400px.png";
import badactor from "../../images/crypto-scam-bad-actor.jpg";
// Save in a file
// import ReactPDF from '@react-pdf/renderer';
// ReactPDF.render(,
${__dirname}/example.pdf
);// Render to a stream
// import ReactPDF from '@react-pdf/renderer';
// ReactPDF.renderToStream();
// Create styles
// Font.register({
// family: 'Oswald',
// src: 'https://fonts.gstatic.com/s/Lato/v13/Y_TKV6o8WovbUd3m_X9aAA.ttf'
// });
Font.register({
family: 'Lato',
src: 'http://fonts.gstatic.com/s/lato/v11/h7rISIcQapZBpei-sXwIwg.ttf'
});
const styles = StyleSheet.create({
body: {
paddingTop: 35,
paddingBottom: 65,
paddingHorizontal: 35,
fontFamily: 'Lato'
},
title: {
fontSize: 24,
textAlign: 'center',
},
author: {
fontSize: 12,
textAlign: 'center',
marginBottom: 40,
},
subtitle: {
fontSize: 18,
margin: 11,
},
text: {
margin: 12,
fontSize: 11,
textAlign: 'justify',
lineHeight:1.4,
},
image: {
marginVertical: 15,
marginHorizontal: 100,
},
logotop: {
marginVertical: 25,
marginHorizontal: 200,
},
header: {
fontSize: 12,
marginBottom: 20,
textAlign: 'center',
color: 'grey',
},
pageNumber: {
position: 'absolute',
fontSize: 9,
bottom: 30,
left: 0,
right: 0,
textAlign: 'center',
color: 'grey',
},
copyright: {
position: 'absolute',
fontSize: 9,
bottom: 30,
left: 320,
right: 0,
textAlign: 'center',
color: 'grey',
},
table: {
display: "table",
width: "auto",
borderStyle: "solid",
borderWidth: 0.5,
borderRightWidth: 0,
borderBottomWidth: 0,
marginLeft:13,
marginRight:13
},
tableRow: {
margin: "auto",
flexDirection: "row"
},
tableCol: {
width: "25%",
borderStyle: "solid",
borderWidth: 0.5,
borderLeftWidth: 0,
borderTopWidth: 0
},
tableCell: {
margin: "auto",
marginTop: 5,
marginBottom:5,
fontSize: 10
},
});
function ReportPDF() {
return (
© Report
Miguel de Cervantes
© Capítulo I: Que trata de la condición y ejercicio del famoso hidalgo D.
Quijote de la Mancha
COPYRIGHT © En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha
mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga
antigua, rocín flaco y galgo corredor. Una olla de algo más vaca que
carnero, salpicón las más noches, duelos y quebrantos los sábados,
CODE CONTINUES BUT END HERE!
`
Does anyone have a solution to our issue or suggested place to look?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions