Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Create a PDF in a Microcontroller.

Status
Not open for further replies.
So are we saying that the micro needs linux running on it and then linux does the task of converting to PDF.

No, there's just been some discussion of what is freely available for creating PDF's - not any suggestion that you MUST run Linux to do so. Obviously running a large OS is just introducing another huge layer of complication.

As I suggested earlier, learn to do it under Windows for a start, and then port it to something smaller (there are a number of websites offering advice on creating PDF's under Windows, or Linux) - bearing in mind we've no idea what the limitations of the unit you linked to might be, but it seems likely that it's very limited in what it can create. The USB side of it it pretty trivial, as USB routines will be freely available for it, and probably included in dev kits and IDE's.
 
if there is no h file out there to process the pdf then we would need to create one .. to do so we would need to know how a pdf file is built.. but it is possible ... is there any reason you couldn't just use text file, ie *.txt those would be way easier to build ....
https://resources.infosecinstitute.com/pdf-file-format-basic-structure/


also i was looking at using the arduino as a mass storage device and from what i am reading this would be the harder part ....
https://arduino.stackexchange.com/questions/34887/can-an-arduino-emulate-a-usb-mass-storage-device
.... sounds a little not good to me
 
You should try making a blank PDF on the computer. And then make one small change (add a letter or something) and then make it again and compare both when opened in notepad and in a hex editor.

Then do it with a more complicated PDF where the only difference is some text in the same place that is changed (i.e. a template).

There's some human readable text and some not. I think it ends up simpler if you actually export a PDF (not just print as PDF) since it keeps the text as text instead of trying to turn it into an image or something non-text.
 
It does not have to be Linux, but it needs to be a system with enough RAM and program storage to be able to run a program based on something like the ghostscript source.
 
also i was looking at using the arduino as a mass storage device and from what i am reading this would be the harder part ....

That's why the device in question uses an ARM processor, and presumably one that's pretty fast and has huge amounts of RAM and ROM - STM32 covers a wide range of ARM devices, and all of them make an Arduino look pretty puny. Presumably to use it as a USB mass storage device just needs a click of a button on the compilers IDE? (similat to MCC for PIC's) - it's certainly all it needs on MicroChip ARM devices.
 
The usual way to create a complex file from a dumb device is to have most of the document already created and stored somewhere on the device. Then, the variable data is simply inserted into the document at predetermined positions. I've used this method to generate Autocad drawings and Excel spreadsheets using very simple software routines. The only gotcha is in the case where the document format includes a checksum to detect corrupted data. In this case, the software needs to generate a proper checksum as well. This gets a lot trickier, but it's still possible.

I agree with the others that a pdf file is probably the least useful format you could find.
 
Status
Not open for further replies.

Latest threads

Back
Top