Jump to content

Sticker generator (noob in need of help)

Hi guys, I am a total newbie to programming. So I came looking for advice. I want to create a program that will run in Win 10. The program is supposed to generate a pdf file with stickers. I need it to be a window with text boxes which you fill and one button, and after pressing the generate button, the inputs go to a template for LaTeX then run MiKTeX compiler and a barcode generator. In the end, it should spit out a pdf with the stickers.

I have made the template in LaTeX, and I can fill it with no problems pretty quickly, but I need this program for other people at our company as they refuse to learn how to use TeXMaker. It will offload a considerable amount of work from me as I am apparently the only one who knows how to use LaTeX and I am bored of doing other people's work. So I thought to myself that I could approach this as a long term project of mine and use it to learn how to code.

My questions are:聽

  • Which language is the most suitable for something like this (I have no experience, but I am a quick learner 馃槈)
  • How to make MiKTeX run the .tex file without me opening TeXmaker and doing it manually
  • How to make a barcode generator spit out the .eps file I need automatically, based on the input from this app
  • How to make it look like a generic Windows 10 program, with Windows like graphics
  • How to not kill the people who are refusing to learn the most basic things

I enclose pictures of how I imagine the program window (done in MS paint 馃槄)聽and also an image of the pdf file generated from my template by MiKTeX.

label_generator_mockup.png

label_sheet_example.PNG

Link to comment
Share on other sites

Link to post
Share on other sites

@gabrielcarvfer聽Thanks a lot, I will try that. I will post my progress here.

Quote

Do you plan on shipping that barcode generator and MiKTeX with your program or not? If you're, you could probably bake these executables into the final one and get a single portable executable to share.

Ye. that would be ideal

Link to comment
Share on other sites

Link to post
Share on other sites

On 9/23/2020 at 4:53 AM, LordNobatko said:

Which language is the most suitable for something like this (I have no experience, but I am a quick learner 馃槈)

I would skip all your other steps. I would use .NET.

Make a basic look winform app.

And generate a crystal report with across and down generation and feed it a table with the data.

making the window : 15 minutes

making the data : 20 minutes

making the report : 30 minutes

On 9/23/2020 at 4:53 AM, LordNobatko said:

How to not kill the people who are refusing to learn the most basic things

LaTeX is not the most basic thing. Very very few people know it. At least around me. I do believe we were only 2 that knew it over the 500+ devs in my old company.

On the other hand you will find 100 times more dev that have worked with either HTML report, Crystal Report, Active Report, Jasper Reports, SSRS, Excel, Word, CSV聽for reporting

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Franck said:

And generate a crystal report with across and down generation and feed it a table with the data

Don't you still need a license for CR, and given he is new to programing I wouldn't say it would be the simplest solution (if he already knows how to use LaTeX)

To @LordNobatko I would recommend something like c# personally (I find in terms of start to finish it gives myself the quickest results usually when needing GUI and in general I love the VS IDE...personally I think it's something Microsoft still does above most others).聽 [If you don't have Visual Studio, there is a free version for C#...albeit with licensing restrictions].

To answer your questions:

Quote
  • Which language is the most suitable for something like this (I have no experience, but I am a quick learner 馃槈)
  • How to make MiKTeX run the .tex file without me opening TeXmaker and doing it manually
  • How to make a barcode generator spit out the .eps file I need automatically, based on the input from this app
  • How to make it look like a generic Windows 10 program, with Windows like graphics
  • How to not kill the people who are refusing to learn the most basic things

1) C# I think is still great for beginners, python is still good but I still prefer C#

2) https://docs.miktex.org/manual/miktex-pdftex.html

-Actually in general googling "[program name] command line" usually returns quite a bit of results...not everything has it, but a surprisingly large amount do support most automations

3) Might be able to skip this step?聽 https://ctan.org/texarchive/graphics/pstricks/contrib/pst-barcode

-I've never run latex before...but looks like they have a barcode plugin for it

4) C# it's a drag and drop on the form and it uses the standard win forms so it's pretty easy

5) ...don't do it for them? :p

For C# and getting it to call a command line program (or program in general)

        Process p = new Process();
        p.StartInfo.FileName = "myexecutable.exe";
        p.StartInfo.Arguments = "/r /t /all /your /commands /here";
        p.StartInfo.UseShellExecute = false;
        p.StartInfo.RedirectStandardOutput = true;
        p.Start();

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, wanderingfool2 said:

Don't you still need a license for CR, and given he is new to programing I wouldn't say it would be the simplest solution (if he already knows how to use LaTeX)

you don't need a license for crystal unless you want the standalone application or the report server or the integration tool with SQL server.聽

Link to comment
Share on other sites

Link to post
Share on other sites

Honestly, you should just do it in HTML, CSS and Javascript ... there's Javascript libraries that generate PDF files, there's Javascript libraries that generate QR codes and barcodes, making a template is easy in CSS and HTML, making the GUI users sees is easy in HTML.

You could also just simply output everything on a canvas object or straight in a html page, and then simply call the Print feature of the browser used to print the page.

You could Bundle everything into an exe using something like Electron , Cordova聽 etc .... but the solution would work just as well if user double clicks on the html file.聽

There's also stuff like Sciter聽https://sciter.com/聽 聽which can do gui with html and css and a custom scripting language, so you can easily make something up in a programming language like Golang for example.聽

An alternative, you could spend something like 20$ on a cheap raspberry pi聽 and set it up with apache/nginx and php and a mariadb/mysql/sqlite database and users around you could just access your pi in browser, and the barcodes can be generated on the fly on the pi and sent as images to be included in the html page with labels and so on...

You'd also benefit because users would just enter the SKU (maybe with autocomplete to fill the sku from database on your pi) and when the SKU is complete, you could auto-populate previously entered bullet points from your database, and the barcode could be cached on your pi in the database or whatever.

Link to comment
Share on other sites

Link to post
Share on other sites

@wanderingfool2聽I will definitely try that as it seems pretty easy, this would be the ideal solution.

As for the others, I do apreciate your insights, but as I said, it needs to be a standalone window.

@mariushm聽The Pi idea is good, although a bit complicated, but I think that I will use the database system for the autofill, that is a great idea!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now