Print Roll Formatted
-
Those do look pretty good. I love the idea of having a means to print them out formatted, but the problem becomes a bit of a bikeshed formatting discussion when people want many different things (X labels per row/column, Y size labels, Z type of printer, etc). It quickly becomes a lot more complicated to code up a proper GUI.
As for the client, on the one hand I can understand where they are coming from, but on the other hand it's an open source platform and it would be nice if something (code, hardware sales, etc) made its way back into the project since their business benefits from it.
-
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.
-
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.
-
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…"
-
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"...
-
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.
-
thanks dude it was exactly what i'm looking for, can i customize it little more :D :D
-
@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.
-
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
-
@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.
-
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.0Let me know what do you think :)
Daniele
-
Will it be possible for you to update "services_captiveportal_vouchers.php" to run smoothly with pfSense 2.3 ?