Creating a pdf file from arduino?

Hello, I was wondering how I would be able to create a pdf file using an arduino? I know how to do keyboard presses from an arduino that presses a button but I wanted to be able to create a pdf file with temperature logging from a external eeprom.

I’m giving this to a friend of mine so he can log some temperatures. He doesn’t know or have anything arduino and I wanted to make it easy for him.

I even thought about putting a SD card module in there. However there is no room for one. Can someone please help me figure out this problem. Im using the example code for keyboard press by arduino.

Joseph

Adobe code is not public domain code, so I doubt they would ever release it for an Arduino. Moreover, the code would be humongous.
Paul

The PDF file format specification is publicly available here and can be used by anyone interested in PDF file format. There are almost 800 pages of the documentation for the PDF file format alone, so reading through that is not something to do on a whim.

here == https://opensource.adobe.com/dc-acrobat-sdk-docs/

Personally, I have not looked at the spec. I do not think it is applicable to Arduino, but Raspberry Pi can manage PDF creation, so you may wish to investigate that as a low-cost option.

May I suggest just printing to serialUSB. Your friend can then use any terminal program that can capture and save a text file. PC's (old cellphones and tablets with BT can be useful too if Arduino has a BT module.)

Did you know you can write your own Android code?
https://appinventor.mit.edu/explore/ai2

If you intend to do this by sending keyboard commands to a computer, then you will need a program on the computer that can write PDF files. All the arduino needs to do is send the correct key sequences. (and the computer cannot be used for anything else at the same time)

Most data logging is done to SD card, very inconvenient to have to always have a PC connected to the arduino.

You might want to consider an ESP8266 or similar that can log over a wifi connection.

?

I can run a terminal program on Win10 and do file logging and barely see the activity show on performance monitor.

Maybe it is time to upgrade from Windows 3.11? :astonished:

Bluetooth / BluetoothLE is an option too.

Once on the PC as a file, print to the PDF device is a freebie.

The OP mentioned the arduino sending keypresses - it is very hard to run a window in the background that actively receives key codes. Not a problem when running a regular USB serial connection.

The original question is rather confusion, because it also makes mention of an external EEPROM with no explanation of how it is being used.

Hello, thank you all. I found online a way to create a txt file from arduino commands and make a file and I’m trying to write the log files to that text file now.

Joseph

Ah, ha. Difficult, but not impossible. Long retired, but back around 2005, my employer decided to incorporate a little service that monitored PC activity. IF we had indicated on the SharePoint server we were "At desk" then the activity service would notify via a message to supervisor that our Screensaver had been on too long. I think this anal scheme was invoked by some VP that saw no humor in the cartoons at the time showing IT operators as spider-web covered skeletons. Anyway, a little VBA code would send out a space character and BS if no keystrokes were registered 30 seconds before the Screensaver kicked in! Goodness, I love technology.

Also, it is rather trivial to have a USB HID bound to a service while the active window gets the real keyboard.

Why PDF? You can create CSV files that your friend can open in various applications (from excel, calc to dedicated csv editors like csved).

The problem I have is that I can not put a SD card module on there no room. I have a small EEProm on there. Just tying to figure out a easy way for him to download the file without having to open program and take all the text from it and then trasnfer it to a text file or pdf or csv as you call it. I'm looking into maybe figuring out how to turn into a mass device maybe. I don' t know yet just trying to throw out idea's right now.

Joseph

I wanna created pdf using arduino too,

i saw once there was a create the do windows commands with the arduino to create txt file. But for some odd reason I can not find that web page it was to long ago.

Joseph

From an EEPROM or to an EEPROM?

How is your friend supposed to read this file? If it was on an SD card his/her computer might have an SD card reader...

I don't know anything about PDF files but my computer has a feature to "print" to a PDF file. (Maybe that's always included with Windows?)

I opened a word processor and typed "Hello". I saved that as a plain text file and I also "printed" it to a PDF file. The text file is 5 bytes as expected. (I confirmed that with a hex editor... Windows shows it as 1K, but that's just the minimum Windows will show.) The PDF file is 70K!

Assuming you're using an Arduino that can emit keystrokes, it's probably something like Windows key and R, notepad enter.

Hello wild bill, that is what I’m trying to do. I just couldn’t figure out how to do it. I rather have a notepad then anything else. Thank you

Joseph