Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Print Roll Formatted

    Scheduled Pinned Locked Moved Captive Portal
    15 Posts 8 Posters 4.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jimpJ
      jimp Rebel Alliance Developer Netgate
      last edited by

      Indeed. I'd rather see a CSS solution than PDF, but that's probably not as printer-friendly. Less overhead in terms of requirements to install, implementation size, etc.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        Kinda convinced it could be shrinked into ~2 files, (one with some GUI code, one include), plus the tFTPD thing (which is basically one PHP class plus Dejavu fonts. All the authentication crap could go to /dev/null, there's also some Germany-only SMS nonsense bundled.

        Still, nontrivial amount of work, and time consuming.

        If someone wants to start a bounty - the primary prerequisite is that the code goes to pfSense itself, BSD-licensed. Definitely not another round of "client paid me to have this feature, look - it's nice…"

        1 Reply Last reply Reply Quote 0
        • E
          eagle2
          last edited by

          @doktornotor:

          Well, the vouchergen thing linked above prints into PDF on itself, using fPDF. That doesn't work with unicode chars. So, I replaced that with tFPDF. What you mentioned is actually configurable via GUI (also paper formats, like the US letter vs A4 etc.), but…

          • the level of integration with pfSense is exactly zero (beyond importing of the voucher rolls).
          • the code is buggy like hell (I made only the very essential fixes to make it run on actually maitained PHP versions.)
          • all the comments are in German;
          • it uses MySQL as storage.

          Don't have time for that, certainly not unless someone produces a reasonable bounty. Plus, until the 2.3 code gets stabilized, it's just a waste of time.

          Hi everyone,

          I'm the guy who developed the vouchergen thing ;). I'm well aware of the current problems, and will fix at least some stuff since it seems to be somewhat popular in Germany (it was initially developed just for a single use case and I decided to share it afterwards…). Someone actually built something based on some code of my script which integrates into pfSense: http://sourceforge.net/projects/captiveportalplus/

          Still not integrated as package or something, but probably closer than my "integration"...

          1 Reply Last reply Reply Quote 0
          • D
            dpa
            last edited by

            it would be nice if something (code, hardware sales, etc) made its way back into the project since their business benefits from it.

            Instructions:

            Copy everything inside 2.2.4 or 2.0.3 folder to "/usr/local/www" of your PF. It will create a new folder "voucherfiles", and a new file " services_captiveportal_vouchers_print.php", and will also replace your "services_captiveportal_vouchers.php", so backup the original. Everything else is new, which can be deleted whenever you want.

            Replace the background image to your company logo, or adjust table layout to whatever suits you.

            cp_print_roll.zip

            1 Reply Last reply Reply Quote 0
            • K
              kiwienka
              last edited by

              thanks dude it was exactly what i'm looking for, can i customize it little more :D :D

              1 Reply Last reply Reply Quote 0
              • I
                Iahmad
                last edited by

                @dpa:

                it would be nice if something (code, hardware sales, etc) made its way back into the project since their business benefits from it.

                Instructions:

                Copy everything inside 2.2.4 or 2.0.3 folder to "/usr/local/www" of your PF. It will create a new folder "voucherfiles", and a new file " services_captiveportal_vouchers_print.php", and will also replace your "services_captiveportal_vouchers.php", so backup the original. Everything else is new, which can be deleted whenever you want.

                Replace the background image to your company logo, or adjust table layout to whatever suits you.

                dear what about 2.2.6. same procedure for it.

                1 Reply Last reply Reply Quote 0
                • D
                  dpa
                  last edited by

                  @kiwienka:

                  thanks dude it was exactly what i'm looking for, can i customize it little more :D :D

                  Yeah you can customize it, it's only html/css.

                  I added color coding (different background images) based on number of minutes. You can change the settings-number of minutes in services_captiveportal_vouchers_print.php lines 121-156. See attached

                  2.2.4.zip

                  1 Reply Last reply Reply Quote 0
                  • D
                    dpa
                    last edited by

                    @ishtiaqaj:

                    @dpa:

                    it would be nice if something (code, hardware sales, etc) made its way back into the project since their business benefits from it.

                    Instructions:

                    Copy everything inside 2.2.4 or 2.0.3 folder to "/usr/local/www" of your PF. It will create a new folder "voucherfiles", and a new file " services_captiveportal_vouchers_print.php", and will also replace your "services_captiveportal_vouchers.php", so backup the original. Everything else is new, which can be deleted whenever you want.

                    Replace the background image to your company logo, or adjust table layout to whatever suits you.

                    dear what about 2.2.6. same procedure for it.

                    I have not looked into 2.2.6, some reported it isn't working on the latest release.

                    1 Reply Last reply Reply Quote 0
                    • D
                      DanieleIT
                      last edited by

                      Hi Dpa,
                      I'd like to let you know that I've just posted a roll print mod based on your code!
                      I've added some extra options, fixed some bugs, and rewrote all the HTML/CSS part using divs.

                      Here's the link to the post:
                      https://forum.pfsense.org/index.php?topic=108846.0

                      Let me know what do you think  :)

                      Daniele

                      1 Reply Last reply Reply Quote 0
                      • R
                        redeyes
                        last edited by

                        Will it be possible for you to update "services_captiveportal_vouchers.php" to run smoothly with pfSense 2.3 ?

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.