These are chat archives for PaperCutSoftware/PaperCutExamples

5th
Oct 2017
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:08 UTC
Hi there, i'm integrating the PaperCut API in our office space management platform. I have some questions about get the user print history.
Is there anybody who can tell me more about a get call for the copy/printing history of an account?
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:10 UTC
Morning
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:10 UTC
Hi Jonathan
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:12 UTC
The XML RPC api has a getUserProperty() call you can use for user accounts where you can get a couple of bits back
  • print-stats.job-count: * total number of print jobs from this user, unformatted, e.g. "1234"
  • print-stats.page-count: * total number of pages printed by this user, unformatted, e.g. "1234"

Is that the sort of thing you are after?

So it would be api.getUserProperty("username", "print-stats.job-count")

Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:13 UTC
thanks jonathan! And what about the copies?
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:14 UTC
Copies is more complicated, I can't see a call for that one
Yea nothing for Copies that I can see, @alecthegeek from PaperCut might have something up his sleeve when he comes online
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:16 UTC
oké thanks
I'll wait for the copies on @alecthegeek
but i've another question
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:18 UTC
Go for it :smile:
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:24 UTC
i'm wondering how it works "in real life" how the prints will be logged from which device (user?)
need users of papercut (tenants of a center) need to install some client on there pc for connecting to printers with papercutsoftware?
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:28 UTC
The quick version is the user will add the printer from the print server and send a print job like normal. PaperCut sits on the print server and detects any new print jobs and extracts the username from the spool file and information about the document like pages, if it is colour the document name and other little bits and it then stores that in the database
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:29 UTC
oké but how are users connected to accounts?
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:29 UTC
Normally it is done through LDAP or AD and PaperCut imports those accounts
In your case though... I suspect internal users would be the best option with the Mobility Print option which uses a client
So from Zapfloor you could add the users by calling api.addNewInternalUser("username", "password") then give them a link to the Mobility Help page which will tell them how to add the printer
If you are planning on using MF so you can bill for photocopies as well your local Reseller / ASC will be able to help you out with the best method for deployment
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:35 UTC

the way we want to work is:

A office operator has users of tenant organisations (these are the shared accounts, right?). By creating an the user, we create an user on papercut, afterwords we create also an shared account for the company (where we can get the prints from). Which call need we to do for connect the shared account to the user? Or do we need to create an user, account and shared account?

PaperCut is a really nice product but there are so much possibilities :smile:
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:36 UTC
:smile: There are a lot of ways to do things
That is why I enjoy working with it
So Shared Accounts are not what you would normally consider to be an Account they are unable to log in to anything and are used for grouping most of the time.
So you could have a user called Dave and he needs to charge his work to either a Maths group or a Science group
To allow this to happen we would need to make a user called Dave and 2 shared accounts one for Maths and one for Science. When printing or doing a photocopy Dave would then get asked if he wants to charge to Maths or Science
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:41 UTC

A report can then be ran against the Shared Accounts to see what the spend has been.

In your case every person who would be printing for a tenant would need an actual user account, From there you could create a shared account for each tenant and add all those users to the shared account.

Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:43 UTC
oke so we can compare that "Maths" is an floor of a building?
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:43 UTC
A floor could work if the tenant rents an entire floor
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:45 UTC
oh no, on every floor there are more tenants (organisations and users)
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:45 UTC
Think of a shared account as an organisation if it helps
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:45 UTC
so: customer/organisation => shared account
user => user
and user belongs to a shared account
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:46 UTC
You got it
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:46 UTC
love life
:D
now the next thing about the mobility printing
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:47 UTC
Mobility of course being one possible way it could all work for you :smile:
It would be my preferred way thinking about it as you will be able to offer printing from Mobile devices without having to mess around
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:51 UTC
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:52 UTC
It would depends on the OS, For Mac OS and iOS it just works for Android and Windows there are applications to make it easier to add the printer
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:53 UTC
ok
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:53 UTC
The Windows installer doesn't really do much it just adds the printer and driver and sorts out the authentication side for you
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 09:56 UTC
and when somebody install the printer in a incorrect way, can he print without a user account?
Jonathan Bennetts
@Joffcom
Oct 05 2017 09:56 UTC
There is a handy option to prevent that :smile:
So you could allow it if you wanted to but I would recommend blocking it.
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:00 UTC
idd we want to block it. Which option is that on the admin of papercut? :)
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:01 UTC
Options > User & Group Sync
Look for "On Demand User Creation" and set it to "Do not create the user and deny usage"
I should take a moment to say I don't actually work for PaperCut I work for one of the ASCs :smile: Sadly not one that covers Belgium though, Your ASC will end up being either Bluemega (bluemega.com) or iTS (its-group.com) both companies would likely help you out with installation if needed and will normally deal with your support issues.
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:12 UTC
Ok thanks
now we are running papercut localy on osx but we i think we can't install the mobility print on our local server, is that possible?
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:13 UTC
Ah
So at the moment there is no Mobility Server for OSX
It is coming though
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:14 UTC
oké but a windows 10 server will work?
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:15 UTC
You will have problems with Windows 10 when you hit a certain amount of users
Annoyingly Desktop versions of Windows have limitation on the amount of connections
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:15 UTC
awtch
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:16 UTC
I think the limit is something like 20 connections, Sadly Microsoft are not as nice as Apple or the kind folk who work on Linux
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:16 UTC
But it will be an windows 10 server
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:17 UTC
As far as I know there is no Server version of Windows 10
There is Server 2016, Is that what you mean?
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:17 UTC
i'll ask to our client
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:18 UTC
I suspect it may be Server 2016 which I guess could be seen as the server version of Windows 10 as it looks the same
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:18 UTC
butit will work fine on windows server 2016?
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:20 UTC
Yea you will be fine on Server 2016
Anything from Server 2008
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:22 UTC
ok thanks. I'm now installing it on a server
Share this link with your users so they can setup their clients: http://[server-host-name]:9163/setup
this link can we send to the users?
with there user-account settings?
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:23 UTC
You can as long as they can resolve the server hostname
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:25 UTC
the network administrator says that they runs windows 10 PRO and not a server OS because that 's not required for papercut
@Joffcom do you have a link where is explained that we need a windows server for mobile prints?
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:27 UTC
It isn't a requirement for Mobility there is just a limitation at the OS level with connections
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:27 UTC
can i find a link for this?
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:29 UTC
I will see if I can dig it out of the MS site
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:32 UTC
thanks
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:33 UTC
I can see people asking about it and I can see how you can check it
but nothing on the MS site about it
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:34 UTC
which username and password do we take for the mobility prints?
we can't find where we can set the password in the admin of papercut
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:35 UTC
It uses the admin username and password for the PaperCut install
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:35 UTC
where can you see people asking about thie limitation? this would be enough for explaining it to him
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:35 UTC
I did just a search for "windows 10 maximum connections"
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:36 UTC
ok
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:38 UTC
The quick version is it will install but there is an OS limitation on network connections, Looks like it is 20 users at once net config server will show this in an elevated cmd window
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:40 UTC
i've running now papercut on a server and it works when i print with the admin user (i can see it in the logs and he prints). But now i want to print with the user acccount of a tenant i create in the backend
how can i set the password for this user?
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:41 UTC
Have you made an internal user yet?
or are you using a domain user?
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:42 UTC
what do you meen with an internal user? where can i find these in de backend of papercut?
what is the difference between a domain user and internal user?
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:43 UTC
Domain user is created in AD or LDAP
Internal User is made in Papercut or through the API
Go to Users > Create Internal User
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:43 UTC
what do you mean with AD or LDAP? :package:
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:44 UTC
Active Directory and LDAP are systems that hold user information
Go with internal users for now
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:44 UTC
ok
i don't find add internal user
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:48 UTC
Go to Options > User & Group Sync and at the bottom of the page you can enable it
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:50 UTC
oh oké nice
this works :) thanks a lot!
Jonathan Bennetts
@Joffcom
Oct 05 2017 10:57 UTC
:smile:
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 10:58 UTC
another question :smile:
can i ask you a last question?
Now i'm wondering what is the right way how we need to work with unlimited prints and copies. Every user can print so much he want, at the end of the month we need to get the prints and copies and then we need to bill it in an invoice
how should we do that on a right way?
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 11:07 UTC
Is this something with the balance?
Jonathan Bennetts
@Joffcom
Oct 05 2017 11:08 UTC
Yea, So you would assign a cost for your prints then you can schedule a report ro run every month that gets the information for the shared account
You will of course need to set PaperCut up for the auto shared account billing side of things
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 11:09 UTC
is it possible to get the report in json with the api?
Jonathan Bennetts
@Joffcom
Oct 05 2017 11:10 UTC
Nope
It is something that has been requested, I remember asking for it. I don't think the data would come back as a json response though it would probably be a local file so you would need to read that
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 11:12 UTC
that local file is a csv or?
Jonathan Bennetts
@Joffcom
Oct 05 2017 11:12 UTC
Getting a json response back though would be a very handy option and easy to deal with ( @alecthegeek )
CSV, HTML or PDF
But of course the API call doesn't exist yet
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 11:13 UTC
idd. We need to get the csv file in a folder and read them out?
Jonathan Bennetts
@Joffcom
Oct 05 2017 11:14 UTC
If you wanted to show the data in your application yes
you can automatically email the report to the user from PaperCut though
which could be an option for you
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 11:14 UTC
yes but we need it automatic on the invoice
or we need the total of the print/copy costs
Jonathan Bennetts
@Joffcom
Oct 05 2017 11:15 UTC
or if you are feeling really brave you could setup PaperCut to use an external database like MySQL and run a select query to get the data you want
Sample report SQL is there so you could modify something there for what you need
That link has the DB types that are supported
You can also use MariaDB instead of MySQL
if needed
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 12:20 UTC
oké that looks a good solution but does it mean that the installer of papercut this need to do?
Wouter Schoofs
@WouterSchoofs
Oct 05 2017 13:52 UTC
is there a more documentated api?
Alec Clews
@alecthegeek
Oct 05 2017 17:54 UTC
Well people have been busy whilst I was asleep :-).

Thanks @Joffcom for giving such good advice. Some follow up points.

You can use internal users, in which case you create and manage the using the web services API.

Alternativly you can use external users. PaperCut default is to depend on AD or LDAP for this, but you can provide an custom sync and auth module instead -- personally I quite like this approach. See here for more details

https://www.papercut.com/kb/Main/CaseStudyCustomUserSyncIntegration

This provides a single point of password auth across both systems
Alec Clews
@alecthegeek
Oct 05 2017 18:00 UTC
Shared Accounts -- you need to manage this via the web services API. You also need to manage the user's account selection mode. So for instance a user might ALWAYS charge to a single shared account, no need to choose the tenant account or personal account. Or maybe they always need to choose... More details on what this means are in the docs
Getting information out: If you only need the information once a day (or week or whatever) then the scheduled CSV report to a file is your best option. No external database required.
If you that is not frequent enough then there are other options
but they are a more complex
Alec Clews
@alecthegeek
Oct 05 2017 18:06 UTC
I am in the process of responding fully to your ticket @WouterSchoofs and I am also updating our your EU PaperCut Authorised solution centre so that they are aware of you project