API support for retrieving page breaks when printing

Posted by: s7subash on 20 September 2018, 4:20 am EST

    • Post Options:
    • Link

    Posted 20 September 2018, 4:20 am EST

    Is there a way to know which columns and rows the page breaks are going to be when generating a PDF or when printing, via the existing API methods?

    I have tried using the getRowPageBreak and the getColumnPageBreak but the methods do not indicate any page breaks being set. My understanding is that this method only indicates the ones that have been manually set using the setRowPageBreak and the setColumnPageBreak respectively.

    Can you please let me know if there is support in the API for knowing the page breaks when printing or creating a PDF?

    Regards

    Subhash

  • Posted 20 September 2018, 6:25 pm EST

    Hello,

    You are right, return type for getRowPageBreak and getColumnPageBreak methods is boolean value which suggest whether the forced page break is inserted earlier for the specified row or column.

    There is no API to know the printing/pdf page breaks however you can first check for pagebreak for desired row/column and then set pagebreak using setRowPageBreak/setColumnPageBreak methods.

    Thanks,

    Deepak Sharma

  • Posted 20 September 2018, 9:25 pm EST

    Hi Deepak,

    Based on your reply my understanding is that, there is no way to know where the automatic page breaks will be set when saving as PDF.

    Any idea if the dev team is planning to add this feature or if we can request for this to be made available in the API?

    Regards

    Subhash

  • Posted 24 September 2018, 11:55 pm EST

    Hi Subhash,

    I have posted it as an enhancement request for future version. The request id for this is 264517

    Thanks,

    Deepak sharma

  • Posted 25 September 2018, 8:32 pm EST

    Hello,

    We would further like to know your use case. Please provide us information on why do you need to know the page break after PDF export or print?

    Thanks,

    Deepak Sharma

  • Posted 26 September 2018, 7:43 pm EST

    Hi Deepak,

    The use case for us is the following

    When a user decides to download a sheet as a PDF or print it we allow the user to set how many pages tall and wide the pdf needs to be and at that point we want to show the user a visual print preview of which columns and rows get put onto each page and for that it is necessary for us to know where the page breaks are going to be placed. for e.g. when the user deicides to create a PDF 2 pages wide and 2 pages tall and we show the print preview of the four pages that gets printed and in those pages show the exact number of columns and rows that would be printed. The goal is to make it work like the Excel print preview mode. Hope that helps if not please feel free to get back and I can elaborate more on the use case.

    Regards

    Subhash

  • Posted 26 September 2018, 9:05 pm EST

    Hi Subhash,

    Thank you for elaborating.

    Once the user decides the page count , why do you need to know the page break since the print is already done.? I mean what would you do after getting to know the pagebreak?

    Do you want to compare the default page break while printing with user options and while printing with default options?

    Sorry, but we need to understand the requirement in detail before setting up a plan to implement this in our future build, also we may find something which is already available.

    Thanks,

    Deepak Sharma

  • Posted 27 September 2018, 3:18 am EST

    Hi Deepak,

    The user goes through the following steps for printing a sheet

    1. User selects the sheet she wants to print
    2. She then decides what would the parameters to use i.e. how many pages tall and how many pages wide
    3. We show a print preview of how the printed sheets would look like and user confirms if she wants to continue with printing
    4. We submit the print job to the printer

    In the above flow when the user reaches step 3 there is a need for showing the print preview of how the pages would look after printing i.e. how many columns and rows each page would contain and what would they be. Because the user has only chosen how many pages tall and how many pages wide there is no manual page break set by the user. We would like to know how the printing algorithm decides where to place the page breaks so that we can show it in the print preview. As mentioned above this feature is very similar to the Microsoft Excel print preview functionality. Hope this answers your question, let me know if you have any further doubts and I will happily clarify them for you.

    Regards

    Subhash

  • Posted 27 September 2018, 5:23 pm EST

    Hi Subhash,

    Thanks for the clarification, I have informed the development team about same. I will let you know once I get an update.

    Thanks,

    Deepak Sharma

  • Posted 14 October 2018, 8:56 pm EST - Updated 3 October 2022, 2:06 am EST

    Hello,

    This has been accepted as an enhancement request for future release. Please let us know if the Print guide like Excel (as shown in attached image) will fulfil your requirement?

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels