diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.34k stars 1.13k forks source link

It can make bookMarks? #237

Closed 405go closed 2 years ago

405go commented 6 years ago

Hello, today i need pdf to have bookMarks, It is support it?

diegomura commented 6 years ago

Hey! No, unfortunately you cannot create bookmarks yet, but it's a great feature to have in the future. Going to keep this ticket open for further development

405go commented 6 years ago

all right, thank you

diegomura commented 6 years ago

I saw you opened an issue on pdfkit here https://github.com/devongovett/pdfkit/issues/821 Thanks. That will speed up things

405go commented 6 years ago

I hope so

diegomura commented 5 years ago

Work to do: implement https://github.com/devongovett/pdfkit/pull/831/files in @react-pdf/pdfkit

Droow commented 4 years ago

Is this already done or not implemented yet?

diegomura commented 4 years ago

No. Not sure why it's closed

ITenthusiasm commented 4 years ago

@diegomura Any updates on this? I'm trying to convince the team at my company to switch to react-pdf, but without bookmarks support I can't sell it. Is it possible to contribute to the @react-pdf/pdfkit repo? Does the change seem feasible enough for someone new to do in a reasonably small time?

ITenthusiasm commented 4 years ago

Also, in case it's a concern, it seems like the latest release for foliojs/pdfkit was June 6, 2019. So the new bookmark feature described in the foliojs/pdfkit issue you mentioned should be fully available now.

bernhardriegler commented 3 years ago

bookmarks/outlines/tags this would be an awesome addition. I would also like to contribute to @react-pdf/pdfkit ... could you give me some pointers where to start?

ACPK commented 3 years ago

@diegomura - Has there been any discussions on implementing bookmarks?

goulkreek commented 3 years ago

Hi

Is there a solution / example on how to combine react-pdf and feature like bookmark/outline from pdfkit ? bookmark / table of content is the last missing feature we need to use react-pdf

Thx in advance

goulkreek commented 3 years ago

Any update un this ?

danomatic commented 3 years ago

This is an important feature for my company. I would be willing to donate a small amount if it helps this to be prioritized higher.

danomatic commented 2 years ago

Thanks! I just became backer because of this and the repeat image optimization! Thanks for the amazing library.

diegomura commented 2 years ago

Thanks @danomatic ! I just saw it. That means the world. It really motivates me to keep working in this project that I love so much. I'll publish a new version very soon with both additions

hjha1011 commented 1 year ago

I am not able to use the bookmark prop on any elements.Is there any fix for that?

diegomura commented 1 year ago

What version are you using? What's the actual issue? Hard to know with so little info

hjha1011 commented 1 year ago

I am using v.2.3.0 and trying to use bookmark as below-

    <Page bookmark="Harry Potter and the Philosopher's Stone">
     <Text bookmark={{ title: "Chapter 1: The Boy Who Lived", fit: true }}>{...}</Text>
    </Page>
  </Document>

But I am getting the error that bookmark is not a valid prop for the text element.

diegomura commented 1 year ago

Maybe it's an error with typings? Can you disable type check and see if works?

process0 commented 1 year ago

@diegomura https://github.com/diegomura/react-pdf/issues/1979

jordhanpoillot commented 1 year ago

You can use :

  const properties = {
    bookmark: "Coordonnées",
  };

  return (
    <View style={StylesGlobal.section} wrap={true} {...properties}>
      <Text style={styles.titre}>Coordonnées</Text>
      <ItemsTable data={coordonnees} columns={colonnesCoordonnees} />
    </View>
  );

or :

  return (
    <View style={StylesGlobal.section} wrap={true} {...{bookmark: "Coordonnées"}}>
      <Text style={styles.titre}>Coordonnées</Text>
      <ItemsTable data={coordonnees} columns={colonnesCoordonnees} />
    </View>
  );