Skip to content

How can I render just the first page of the pdf? #1151

Answered by Chagall
biagiola asked this question in Q&A
Discussion options

You must be logged in to vote

The index.js file contains this part of the code which renders you 3 different styles of resumes.

const Output = () => (
  <Document
    author="Luke Skywalker"
    keywords="awesome, resume, start wars"
    subject="The resume of Luke Skywalker"
    title="Resume"
  >
    <Resume size="A4" />
    <Resume orientation="landscape" size="A4" />
    <Resume size={[380, 1250]} />
  </Document>
);

I think what you want is to render just one them, right? To do that just delete or comment 2 of the Resume objects, like this:

const Output = () => (
  <Document
    author="Luke Skywalker"
    keywords="awesome, resume, start wars"
    subject="The resume of Luke Skywalker"
    title="Resume"
  >
  …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@biagiola
Comment options

Answer selected by biagiola
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants