Prawn - Zoom out contents so that it fits in one pageHow to retrieve a cell's height using Prawn & Prawnto?Prawn pdf and page breaksPrawn: Table of content with page numbersPrawn produces blank page when generating PDF from imagesTables in PDF with horizontal page breaksiTextSharp - Fit formatted Text to single pagePrawn bounding box stroke with auto heightGenerate PDF of a section of a php page once rendered into HTML and CSS and account for pdf page-breaksHow to check if a boundbox fits the current page in PrawnIs it possible to make a TCPDF element with maximum height?

I unknowingly submitted plagiarised work

Ticket sales for Queen at the Live Aid

Identifying an object pointer by generating and using a unique ID

Is there a down side to setting the sampling time of a SAR ADC as long as possible?

Would jet fuel for an F-16 or F-35 be producible during WW2?

How can people dance around bonfires on Lag Lo'Omer - it's darchei emori?

Can't remember the name of this game

Under what law can the U.S. arrest International Criminal Court (ICC) judges over war crimes probe?

How do I align equations in three columns, justified right, center and left?

If a person had control of every single cell of their body, would they be able to transform into another creature?

Why do they consider the Ori false gods?

Plot twist where the antagonist wins

How bitcoin nodes update UTXO set when their latests blocks are replaced?

I think I may have violated academic integrity last year - what should I do?

What are these arcade games in Ghostbusters 1984?

Why is this Simple Puzzle impossible to solve?

Array Stutter Implementation

Placing bypass capacitors after VCC reaches the IC

General purpose replacement for enum with FlagsAttribute

How to capture more stars?

What is the difference between nullifying your vote and not going to vote at all?

Dictionary size reduces upon increasing one element

Can you heal a summoned creature?

Employer asking for online access to bank account - Is this a scam?



Prawn - Zoom out contents so that it fits in one page


How to retrieve a cell's height using Prawn & Prawnto?Prawn pdf and page breaksPrawn: Table of content with page numbersPrawn produces blank page when generating PDF from imagesTables in PDF with horizontal page breaksiTextSharp - Fit formatted Text to single pagePrawn bounding box stroke with auto heightGenerate PDF of a section of a php page once rendered into HTML and CSS and account for pdf page-breaksHow to check if a boundbox fits the current page in PrawnIs it possible to make a TCPDF element with maximum height?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have a dynamic PDF report which gives monthly report of our database. I am using Prawn to generate the PDF report.



The monthly report can contain maximum of 90 rows (maximum 3 per day). There can also be days with no record. So, the number of rows in a monthly report is highly dynamic.



The client needs the report in a single page PDF. They dont care if the font size becomes very small or the row height is really small. But the contents should fit in a single page.



They have shown examples of PDF that are generated using their previous application. In those, it seems that they are creating the table with a fixed font size and row height etc. and they are somehow zooming out so that the PDF has some whitespace in the right side of the page, but it fits in a single page.



Something like this:
Something like this



Is there a way to achieve this in Prawn?










share|improve this question






























    0















    I have a dynamic PDF report which gives monthly report of our database. I am using Prawn to generate the PDF report.



    The monthly report can contain maximum of 90 rows (maximum 3 per day). There can also be days with no record. So, the number of rows in a monthly report is highly dynamic.



    The client needs the report in a single page PDF. They dont care if the font size becomes very small or the row height is really small. But the contents should fit in a single page.



    They have shown examples of PDF that are generated using their previous application. In those, it seems that they are creating the table with a fixed font size and row height etc. and they are somehow zooming out so that the PDF has some whitespace in the right side of the page, but it fits in a single page.



    Something like this:
    Something like this



    Is there a way to achieve this in Prawn?










    share|improve this question


























      0












      0








      0








      I have a dynamic PDF report which gives monthly report of our database. I am using Prawn to generate the PDF report.



      The monthly report can contain maximum of 90 rows (maximum 3 per day). There can also be days with no record. So, the number of rows in a monthly report is highly dynamic.



      The client needs the report in a single page PDF. They dont care if the font size becomes very small or the row height is really small. But the contents should fit in a single page.



      They have shown examples of PDF that are generated using their previous application. In those, it seems that they are creating the table with a fixed font size and row height etc. and they are somehow zooming out so that the PDF has some whitespace in the right side of the page, but it fits in a single page.



      Something like this:
      Something like this



      Is there a way to achieve this in Prawn?










      share|improve this question
















      I have a dynamic PDF report which gives monthly report of our database. I am using Prawn to generate the PDF report.



      The monthly report can contain maximum of 90 rows (maximum 3 per day). There can also be days with no record. So, the number of rows in a monthly report is highly dynamic.



      The client needs the report in a single page PDF. They dont care if the font size becomes very small or the row height is really small. But the contents should fit in a single page.



      They have shown examples of PDF that are generated using their previous application. In those, it seems that they are creating the table with a fixed font size and row height etc. and they are somehow zooming out so that the PDF has some whitespace in the right side of the page, but it fits in a single page.



      Something like this:
      Something like this



      Is there a way to achieve this in Prawn?







      ruby-on-rails ruby ruby-on-rails-4 pdf-generation prawn






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 24 '15 at 11:46







      rubyprince

















      asked Feb 24 '15 at 10:22









      rubyprincerubyprince

      14k85193




      14k85193






















          2 Answers
          2






          active

          oldest

          votes


















          1














          The needed page layout can be easily achieved with PD4ML's fitPageVertically() API call - but PD4ML approach differs from Prawn quite significantly.



          With PD4ML you have to generate an HTML document with report data/table (not that tricky to do) and after that pass it to PD4ML for a converting to PDF.



          PD4ML in Ruby scenario can be launched as a standalone converter application.






          share|improve this answer






























            0














            1. You can build a fixed size table for print with option:

            overflow: :shrink_to_fit



            in table cells. That will shrink to a smaller font automatically.



            1. given the number of rows to be print, you can dynamically adjust tables row heights

            see: http://prawnpdf.org/prawn-table-manual.pdf






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f28693209%2fprawn-zoom-out-contents-so-that-it-fits-in-one-page%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              The needed page layout can be easily achieved with PD4ML's fitPageVertically() API call - but PD4ML approach differs from Prawn quite significantly.



              With PD4ML you have to generate an HTML document with report data/table (not that tricky to do) and after that pass it to PD4ML for a converting to PDF.



              PD4ML in Ruby scenario can be launched as a standalone converter application.






              share|improve this answer



























                1














                The needed page layout can be easily achieved with PD4ML's fitPageVertically() API call - but PD4ML approach differs from Prawn quite significantly.



                With PD4ML you have to generate an HTML document with report data/table (not that tricky to do) and after that pass it to PD4ML for a converting to PDF.



                PD4ML in Ruby scenario can be launched as a standalone converter application.






                share|improve this answer

























                  1












                  1








                  1







                  The needed page layout can be easily achieved with PD4ML's fitPageVertically() API call - but PD4ML approach differs from Prawn quite significantly.



                  With PD4ML you have to generate an HTML document with report data/table (not that tricky to do) and after that pass it to PD4ML for a converting to PDF.



                  PD4ML in Ruby scenario can be launched as a standalone converter application.






                  share|improve this answer













                  The needed page layout can be easily achieved with PD4ML's fitPageVertically() API call - but PD4ML approach differs from Prawn quite significantly.



                  With PD4ML you have to generate an HTML document with report data/table (not that tricky to do) and after that pass it to PD4ML for a converting to PDF.



                  PD4ML in Ruby scenario can be launched as a standalone converter application.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 24 '15 at 14:55









                  zfrzfr

                  20139




                  20139























                      0














                      1. You can build a fixed size table for print with option:

                      overflow: :shrink_to_fit



                      in table cells. That will shrink to a smaller font automatically.



                      1. given the number of rows to be print, you can dynamically adjust tables row heights

                      see: http://prawnpdf.org/prawn-table-manual.pdf






                      share|improve this answer



























                        0














                        1. You can build a fixed size table for print with option:

                        overflow: :shrink_to_fit



                        in table cells. That will shrink to a smaller font automatically.



                        1. given the number of rows to be print, you can dynamically adjust tables row heights

                        see: http://prawnpdf.org/prawn-table-manual.pdf






                        share|improve this answer

























                          0












                          0








                          0







                          1. You can build a fixed size table for print with option:

                          overflow: :shrink_to_fit



                          in table cells. That will shrink to a smaller font automatically.



                          1. given the number of rows to be print, you can dynamically adjust tables row heights

                          see: http://prawnpdf.org/prawn-table-manual.pdf






                          share|improve this answer













                          1. You can build a fixed size table for print with option:

                          overflow: :shrink_to_fit



                          in table cells. That will shrink to a smaller font automatically.



                          1. given the number of rows to be print, you can dynamically adjust tables row heights

                          see: http://prawnpdf.org/prawn-table-manual.pdf







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 24 at 7:24









                          MichailMichail

                          708




                          708



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f28693209%2fprawn-zoom-out-contents-so-that-it-fits-in-one-page%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                              Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript