Skip to content
New issue

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

pdf output have a weird font #622

Closed
agrapana opened this issue Nov 3, 2019 · 4 comments
Closed

pdf output have a weird font #622

agrapana opened this issue Nov 3, 2019 · 4 comments
Labels
needs more info question stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@agrapana
Copy link

agrapana commented Nov 3, 2019

react-native application version:
react-native@0.61.2
react-navive-share@2.0.0
rn-fetch-blob@0.11.2
server with version:
html-pdf@2.2.0

trying to share pdf online, the location is from the server. and get this output when share, could someone point out, maybe its because of the react-native-share, and i'm doing it wrong?
(because i tried locally and its works fine)

below are my code so far:

my api at nodejs :

router.route('/fetchpdf').get((req, res) => {
    const filePath = path.resolve(`${__dirname}/../../pdfquotation/${req.query.fileid}.pdf`);
    res.sendFile(filePath)
})
RNFetchBlob.config(configOptions)
  .fetch('GET', `http://domainName.com/api/pdf/fetchpdf?fileid=${fileid}`)
      .then(resp => {
          filePath = resp.path();
          return resp.readFile('base64');
      })
      .then(async base64Data => {
           base64Data = `data:${type};base64,` + base64Data;
           await SharePDF.open({ url: base64Data, title: 'title here' });
      });

and the result that i got when fetching from nodejs are :
alien

@jgcmarins
Copy link
Member

@agrapana I guess this question applies better in Stack Overflow.
I am not sure what could be wrong. Did you check if it has the same md5?

@agrapana
Copy link
Author

agrapana commented Nov 5, 2019

@jgcmarins thank you for your reply, i also asked at stackoverflow and html-pdf trying to find out where is the problem.

@stale
Copy link

stale bot commented Jan 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and i will leave this open.

@stale stale bot added the stale There has been a lack of activity on this issue and it may be closed soon. label Jan 4, 2020
@stale
Copy link

stale bot commented Jan 11, 2020

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

@stale stale bot closed this as completed Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info question stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants