We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why it's just render a 'red' blank block not rendering a Image at this code
import { Document, Page, Text, View, StyleSheet, Image as PDFImg, Font } from '@react-pdf/renderer'
const styles = StyleSheet.create({ image: { width: 50, height: 50, objectFit: 'contain', backgroundColor: 'red', } })
<View style={styles.table}> <View style={[styles.tableRow, styles.tableHeader]}> <Text style={styles.tableCell}>Image</Text> <Text style={styles.tableCell}>STT</Text> <Text style={styles.tableCell}>Sản phẩm</Text> <Text style={styles.tableCell}>Đơn giá</Text> <Text style={styles.tableCell}>SL</Text> <Text style={styles.tableCell}>Thành tiền</Text> </View> {order.orderItems?.map((item, index) => ( <View key={index} style={styles.tableRow}> <PDFImg src='link_to_any_image_in_google' style={styles.image} /> <Text style={styles.tableCell}>{index + 1}</Text> <Text style={styles.tableCell}>{item.productName}</Text> <Text style={styles.tableCell}>{formatPriceVnd(item.price)}</Text> <Text style={styles.tableCell}>{item.quantity}</Text> <Text style={styles.tableCell}>{formatPriceVnd(item.price * item.quantity)}</Text> </View> ))} </View>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Why it's just render a 'red' blank block not rendering a Image at this code
import { Document, Page, Text, View, StyleSheet, Image as PDFImg, Font } from '@react-pdf/renderer'
The text was updated successfully, but these errors were encountered: