Home Forums Support Custom Page Size / Page Orientation

This topic contains 8 replies, has 4 voices, and was last updated by  billyggla 1 week, 5 days ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #16019

    alex_t45
    Participant

    Hi everyone. I apologise if this topic has been covered before but I can’t seem to find any info on how to set custom page size or change page orientation.
    Is it possible to change page orientation from portrait to landscape or change the paper size to custom dimensions?
    Thanks in advance !

    #16021

    Hillel Coren
    Keymaster

    The page size can be adjusted on Settings > Invoice Design.

    Changing the orientation would require changing the code.

    #16023

    alex_t45
    Participant

    Thanks for the reply, Hillel. I have seen the “Page Size” setting in “Invoice Design” tab but all the entries in that drop down list are predefined sizes and in portrait mode. I was hoping to change the page size values so that I can have a landscape page orientation.

    In order to switch to landscape page orientation, what code do I need to change? I am having a self hosted version 4.5.3. Although I am not a developer, I may be able to change the code if you can point me in the right direction on what code needs to be changed.
    Thanks in advance!

    #16033

    Hillel Coren
    Keymaster

    We use pdfmake to generate the PDF, it requires a document definition (dd) which is defined here:

    https://github.com/invoiceninja/invoiceninja/blob/master/resources/assets/js/pdf.pdfmake.js#L136

    You can find out about the additional options here:

    http://pdfmake.org/#/gettingstarted

    Note: we compile the JS/CSS files, there’s more info here:

    https://invoice-ninja.readthedocs.io/en/latest/developer_guide.html#code

    #16080

    alex_t45
    Participant

    Thanks for taking your time to guide me on this. I appreciate very much. Unfortunately, I tried but could not figure out how to change the page orientation by looking at the reference material that you have provided. Perhaps because I am not a developer, I mistakenly hoped that this task could be achieved easily by changing a couple of lines of codes, and the explanation of how to do this would be in a knowledgebase or an FAQ.

    I understand that the portrait mode page orientation is sufficient for many people but I am sure there are some people out there, like me, who might need landscape mode for various reasons. Is there any plans for implementing an option for users to switch between Portrait and Landscape mode? Thanks!

    #16081

    Hillel Coren
    Keymaster

    Sorry, this is the first time it’s been requested. We don’t have any plans to add it.

    You may want to consider hiring a developer on upwork.com or submitting a request here:

    https://www.sometechie.com/customize-invoice-ninja/

    #16086

    alex_t45
    Participant

    I understand. I wish I could hire a developer but I can’t right now. Thanks for the suggestion anyway.

    #17223

    branto
    Participant

    I would like to +1 for the ability to change page orientation for invoices, quotes, and proposals.

    #17229

    billyggla
    Participant

    dd.pageOrientation = ‘landscape’;

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

Posted in: