How do i download pdf as same as it is displaying the application?

How do i download pdf as same as it is displaying the application?

MuraliVenkatMuraliVenkat Posts: 8Questions: 2Answers: 0

Hi all,
I am a newbie to this forum and am working on data tables export. I want to make PDF and print task for my project. For my task, I need to show the same count as in the application to the print paper and as well as pdf.


I have shared a screenshot. In the first screenshot, am showing only 10 persons so I want to show only that 10 persons in the print and PDF. How can I make it? Can anyone help me on this?

Thanks in advance.

This question has accepted answers - jump to:

Answers

  • colincolin Posts: 1,193Questions: 0Answers: 226
    Answer ✓

    Hi @MuraliVenkat ,

    Take a look at this thread, it's discussed and resolved there.

    Cheers,

    Colin

  • allanallan Posts: 46,556Questions: 1Answers: 6,497 Site admin
    Answer ✓

    Use the modifier option of the exportOptions option in the pdfHtml5 button type to control the records being exported:

    {
      extend: 'pdfHtml5',
      exportOptions: {
        modifier: {
          page: 'current'
        }
      }
    }
    

    Allan

  • MuraliVenkatMuraliVenkat Posts: 8Questions: 2Answers: 0
    edited June 13

    Hi @colin and @allan
    Thanks for your reply. It worked for the current page that is visible but I have some 10 pages means what should I do? In print section it is showing only the current page.

  • colincolin Posts: 1,193Questions: 0Answers: 226

    I'm confused now - weren't you asking for only the current page to be printed? Isn't that what you wanted?

  • MuraliVenkatMuraliVenkat Posts: 8Questions: 2Answers: 0

    @colin
    In the first screenshot, it has 6 pages and I have to display all six pages record exactly, in the same manner, it is displaying in the application. Forex: Every page contains 10 records so i have to show 10 records on every page for print as well as pdf.

  • allanallan Posts: 46,556Questions: 1Answers: 6,497 Site admin

    Thanks for the clarification. I'm afraid that is not something that the PDF export is currently capable of doing. You'd probably need to send the data to a server which can generate the PDF output you want.

    Allan

  • MuraliVenkatMuraliVenkat Posts: 8Questions: 2Answers: 0

    @allan
    Thanks for the quick reply. I will find the solution.

  • MuraliVenkatMuraliVenkat Posts: 8Questions: 2Answers: 0

    @allan
    What about print? Can we have any options to do it for the print page?

  • MuraliVenkatMuraliVenkat Posts: 8Questions: 2Answers: 0

    Hi @allan and @colin
    I have a problem like I am calculating total amount for every page and Grand total and displaying it. It is showing correctly on the web page but if I give a print, Every page is displaying the same total. I have added a screenshot for your reference. Can you please help me with this? Thanks in advance.



  • colincolin Posts: 1,193Questions: 0Answers: 226

    We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.