Closed MSH786 closed 3 years ago
OR this issue facing becuase of images over internet
I am trying with file system after that revert back to you
This issue remain with file system
i have used image picker library but remain same
I have the same issue, any update?
EDIT:
@MSH786 worked for me removing file://
from the file system images path, try it!
ok i will use check and revert back to
I have the same issue, any update?
EDIT: @MSH786 worked for me removing
file://
from the file system images path, try it!
OK, i will check and revert back to you .
Thank You
I have the same issue :c
What version of React Native are you guys using, and can you prepare a reproduction project so we can easily run locally and reproduce?
Alright, as I can't reproduce I'll close this issue. If this is still a problem please open up a new issue with a reproduction repository and I'd be happy to have a look.
I have the same issue, any update?
EDIT: @MSH786 worked for me removing
file://
from the file system images path, try it!
this worked for me for the package 'react-native-image-to-pdf'
I have the same issue, any update? EDIT: @MSH786 worked for me removing
file://
from the file system images path, try it!this worked for me for the package 'react-native-image-to-pdf'
Hi, could you please help me with this issue ??
I have the same issue, any update? EDIT: @MSH786 worked for me removing
file://
from the file system images path, try it!this worked for me for the package 'react-native-image-to-pdf'
Hi, could you please help me with this issue ??
if it's ios keep "file://" else remove it for android.
hi, when i run code,
then i get error, attach screenshot
here is my code
import React from 'react'; import type {Node} from 'react'; import { SafeAreaView,TouchableOpacity, ScrollView, StatusBar, StyleSheet, Text, useColorScheme, View, } from 'react-native'; import PDFLib, { PDFDocument, PDFPage } from 'react-native-pdf-lib';
const App=() => {
const generate=async()=>{
const page1 = PDFPage .create() .setMediaBox(200, 200) .drawText('You can add text and rectangles to the PDF!', { x: 5, y: 235, color: '#007386', }) .drawRectangle({ x: 25, y: 25, width: 150, height: 150, color: '#FF99CC', }) .drawRectangle({ x: 75, y: 75, width: 50, height: 50, color: '#99FFCC', });
// Create a PDF page with text and images const jpgPath = "https://commons.wikimedia.org/wiki/File:Sunflower_from_Silesia2.jpg"// Path to a JPG image on the file system... const pngPath = "https://www.freepik.com/free-photos-vectors/png"// Path to a PNG image on the file system... const page2 = PDFPage .create() .setMediaBox(250, 250) .drawText('You can add JPG images too!') .drawImage(jpgPath, 'jpg', { x: 5, y: 125, width: 200, height: 100, }) .drawImage(pngPath, 'png', { x: 5, y: 25, width: 200, height: 100, });
}
return ( <TouchableOpacity onPress={()=>{ generate() }} >
); };
export default App;