My company is developing an ERP software for small businesses and we're encountering a recurrent problem.

In the "Invoices" part of the app, there's a "View/Print" button that exports the invoice to a PDF file. The problem is that more often than we'd like, users will change a setting in the invoice, or add a product, or change anything really, and then open the "PDF files" folder and grab the invoice's PDF file to send it. Note that they didn't click the View/Print button, so the PDF file hasn't been regenerated, so it's not up to date.

We can't prevent the user from accessing the PDF files folder because they may want to copy the PDF file to a USB key, and the only potential solution we thought about is regenerating the PDF file every time something is changed for the invoice, which really slows down the app since generating the PDF file can take up to 1 or 2 seconds if the invoice has lots of lines.

We have already tried repeating repeatedly to the users that the PDF files are not automatically generated and that they must click View/Print to regenerate it, but they always forget it and then yell over the phone that the PDF files are out of date.

What would be the best way to solve this issue?

note: invoice is a loose translation of the French, according to Google Translate, "bill" would also work. I'm just talking about a document containing a list of products that the client ordered and the total amount that needs to be paid

  • 11
    "Invoice" is completely the correct word. ("Bill" is slightly more informal, but also correct).
    – AndyB
    Jul 5, 2019 at 22:58
  • 3
    I'd presume that there is a Save Changes button that they must click after making all changes. Automatically regenerate the PDF when that is clicked.
    – RonJohn
    Jul 6, 2019 at 7:11
  • 6
    @zdimension Rename the "print/view" as "save changes": problem solved. Jul 6, 2019 at 16:06
  • 1
    To me it seems that the confusion is arising because the label on the button (presumably) reads "view/print". In the user's mind, they don't want to view or print the file. In their mind, what they want to do is send (email?) it. If anything, the user might be actively avoiding this button to avoid the disruption of having a PDF viewer suddenly open up. With no technical understanding of how the software works, the user won't understand that clicking "view/print" is necessary to update the stored file. Jul 6, 2019 at 16:06
  • 3
    Personally I would suggest changing the text to read "update PDF" or "refresh PDF" (and removing the "feature" to automatically open the PDF for viewing/printing after clicking this button) or adding a separate button to do this without automatically opening the resulting file (users will only need to click one of these two buttons to update the file but clicking both won't do any harm). You could even go a step further and include a similar button labelled "send" that automatically initiates the sending procedure (open email client and attach file?) with the PDF file already in place. Jul 6, 2019 at 16:07

12 Answers 12


Since your UI does not work, and your users does not understand the generation - you need to automate the process. If there is an existing invoice, the pdf-file needs to be deleted from the folder as soon as something is changed on the order, then recreated as soon as the users prints it again.

Usually you don't send the invoice before the products have been shipped, and you use that picking list as reference of what was actually sent. There are cases where you can't pick the complete order, and need to make a partial delivery. In that case you could send an invoice of the shipped goods.

I think you need to redo the whole order process and automate the invoice process making it impossible to invoice wrong. What is shipped is invoiced.

  • 14
    This is really the best solution. Removing the old file as soon as it isn't valid any more stops users from getting an obsolete file and when they can't find it in the folder they'll hopefully remember that they need to generate it again. Jul 5, 2019 at 21:59
  • 4
    Especially as this would be a change to the workflow and not a new process, I think this solution would only result in a lot more support calls wondering why the system isn't generating PDFs anymore. Jul 5, 2019 at 22:09
  • 27
    Deleting old information is a horrible idea. The user very well might want to compare the old and new invoices.
    – RonJohn
    Jul 6, 2019 at 7:07
  • 4
    Your customers will be in big trouble with their accountants, auditors and the tax inspector if it's possible to generate different versions of an invoice (facture) with the same number, or to cancel an invoice without a corresponding credit note (avoir). On the other hand, if it's just a quotation (devis), it's not so serious, but they must have different references, so everyone is clear which one has been accepted.
    – grahamj42
    Jul 6, 2019 at 12:03
  • 14
    @RonJohn Versions of an order should reside in the system. Not the document where users need to compare manually. Automate!!! Jul 6, 2019 at 12:05

What if you compare it to a download button on any website that downloads the pdf. You cant access the file server but have to click the download button in order to get your file and will always download the latest version.

In your situation, the only way to acces the pdf directory could be though the 'view/print' button. This button will show the directory with the pdf and will only show the latest version. Previous versions will be either deleted upon pressing the button or are located in a different directory.

This way people are still be able to move it to USB sticks etc.


It sounds like you've got a decision to make: Are you maintaining a folder of PDFs for the users to directly access, or are you not?

If you are not, and this is an example of users discovering an unintended shortcut around your planned workflow, then I'd suggest making it impossible for users to do this. Use a different file format, put your PDFs in an archive, change the extension so they don't "look" like PDFs, whatever. The users may complain, but they'll get over it and their workflow will adapt.

If you do want to be in the business of maintaining a folder of PDFs for them, then you may want to look into having a background thread that deletes the old PDF and begins writing the new one whenever they update an invoice. That way, the app does not need to freeze for several seconds when they change something. This frees you to get rid of the view/save button if you want, because now the folder is the authoritative source. Or, if you decide to keep the view/save button, then there's the bonus that you can serve the PDF directly from the folder* instead of having to generate a whole new PDF for an unchanged invoice every time the user clicks the button.

*(note that you'll probably want to have some security preventing users from modifying PDFs in the folder -- storing the file's MD5 hash, for example)

NOTE: I'm assuming that the "PDF Files" folder is part of your app and not just an example of a folder your users might happen to save downloaded documents into. If that's the case, then you've got a classic document management problem... SharePoint and pals deal with this every day - you might want to look into how they handle it, but I'm not aware of a good and unobtrusive solution.


I guess you want a quicker solution than building a new invoicing system. The real pain point seems to be this:

We can't prevent the user from accessing the PDF files folder because they may want to copy the PDF file to a USB key, …

The solution is to prevent them from access that folder and only allow downloading the PDF from the application. The download button “knows” when changes have been made and will start generating a new PDF before downloading it. If no changes were made, it can start the download immediately. Note that if there are multiple download buttons within the whole application, every button should check if a change was made and generate the PDF before downloading it.


In my opinion, the solution is simple, and I think it can be implemented. You need to write a code detecting any small change on the Invoice after the last time you exported the PDF and the moment the change happens try to show a gentle message on top of the screen in red, warning or notifying the user that there are changes occurred over your invoice and you need to export another version of your PDF file.

Check below:

enter image description here

Another Solution

We can do a turn around solution using a wizard which forces the user to go through editing his invoice data then preview his changes to make export for the invoice PDF, like the following:

Step one Open the invoice in editable mode and do all the needed changes

Step two Force the user to go next to preview his changes and click Export as PDF, without this step he will lose all his changes.

And without the second step, he will not get his new changes, Check here:

enter image description here

Hope this can help!

  • 1
    This is a good solution, since it doesn't try to access the file after export, but tries to tackle the problem "the user forgets to export again after changing something" and should be implemented without a lot of work
    – Falco
    Jul 8, 2019 at 12:40
  • I added an update @Falco on how to force the user to go for previewing then export through using a wizard. I think this way will help the employee to do not jump over and forget to export his updated invoice. Jul 8, 2019 at 14:02

It sounds like users are using View/Print to review what they've already done, and then making changes based on what they've reviewed. If that's the case, a possible solution would be to clearly differentiate previewing and saving so that users are able to preview the document without creating anything that can be accidentally sent to their customers.

Have a "Preview" option that creates a temporary PDF, stores it in a place the user will not access, and automatically opens it. (You could mark it as a draft on the top of the document since it is a draft).

Then, have a "Save" or "Finalize" option that saves the PDF in the "PDF Files" folder. You could have a confirmation here since it should only happen once per document.

The key is making it nigh impossible for users to click "Save" when they intend to preview. So it might even be worth having a separate screen: A big, friendly "Preview" button on the first screen, and a smaller "Next" link below it. On the next page, no option to edit, but an option to Save/Print.

  • +1 for "mark as draft", preferably as a large watermark. If the order has not been finalized, you can't really issue an invoice yet. It shouldn't even have an invoice number until it's officially an order. Jul 8, 2019 at 20:23

A repository of invalid / outdated invoices

In complement to Benny Skogberg answer, save a link with a hash on every PDF generated and the same hash on your central server. When you detect a change that invalidates a previous generated PDF, mark that hash as invalid / old.

On PDF show a message about "invoice validation before payment" where the link, already with the hash informs if the PDF is outdated.

  • +1 but you could probably do this without saving a hash right? Just save the last modification date, then when the user opens the saved PDF folder you can mark any that were saved before that date as outdated.
    – DasBeasto
    Jul 8, 2019 at 13:56
  • This could work, but consider time zones + daylight saving time. Last data == correct data only in context of a linear time tracking. The real world is not that nice. Jul 11, 2019 at 14:26

My answer is to suggest working within the current bounds of what you have tried.

I would do this by adding a user/system setting for the account which allows them to either create the PDF each time they make a change, as you stated for them to have to do it manually each time.

It's not great, but it puts control back in their hands. Other than that - the option is to redesign the interface as Benny suggested.


If there is a separate UI/app to get to the folder of pdfs, you could tell the user on navigation that (there are unexported/unsaved changes and pdf is outdated)That way they can go back and do it.

If that is somehow not possible(like ftp folder or file system) you could give a visible message on the UI screen where user is making changes that changes need to be exported(view/print pdf) if they wish to see the pdf in folder.

Additionally you could make/update a file some-files-not-up-to-date.txt and add the filename which is not latest(exported manually) when user exits the UI of making changes. I am not recommending writing a pdf file directly because user could have made unintended changes or may not wish to export the changes.


A slight variation on a couple of other answers, and simplified from the user perspective:

Any time that invoice data is changed & saved - i.e., any change that would visibly change an invoice and saved in a way that if the user went into the program from another computer, the changes would be visible, the program should do two things:

  • Delete the existing PDF. This should take an insignificant amount of time, so it will not delay the user.
  • Trigger a background process to create a new PDF. This may take a few seconds to run, but will not noticeably delay the user.

Users will always see only the latest PDFs in the directory. If they don't see the PDF of the invoice they just changed, all they have to do is wait a few seconds and it will magically appear.

Anything involving timestamps or other flags on files will be ignored by users. Deleting the file is the only foolproof solution. And recreating the file automatically is the only complaint-free solution.


Adding a timestamp to the file name of the generated PDF would help? That way if the user makes a change and then goes to copy or send the file right after, they might notice that the timestamp is older than the last change they know they made.

Example: instead of:


Consider something like:


There are different ways of formatting the timestamp, but I would encourage using one (like this) where if the user sorts the list of files by name, they are sorted properly by time stamp as well - that would help them build the habit of always looking for the most up-to-date one on the server.

  • Me: "So the latest one is invoice-10043-acme_corp-exported-20190706T0944.pdf, that looks right. Download. AAAH ITS WRONG!" or Me: "Hmm, do I need invoice-10043-acme_corp-exported-20190706U0944.pdf or invoice-10043-acme_corp-exported-20190706T0944.pdf?" Because all my brain sees is "invoice-NUM-acme_corp-exported-GIBBERISH.pdf" Jul 8, 2019 at 17:10
  • If you go with this, it might be a good idea to format the timestamp, e.g. invoice-10043-acme_corp-export-2019_07_06-09_44.pdf. But a potential problem is that this way the old file will not be overwritten.
    – Nulano
    Jul 8, 2019 at 19:18

A simple way that might work depending on your situation, is to automatically delete PDFs when they go out of date.

So instead of generating a PDF when they make a change, delete the PDF that matches that invoice number.

This will prevent them from being able to get out-of-date PDFs, and will probably also teach them quite quickly that one needs to regenerate it if they don't want to waste time not being able to find it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.