Datasheet Link

I would like to create an attribute that is the local (or remote) path of the PDF-datasheet of the component. In order to be flexible to be able to move the datasheets in another place (new installation etc…), I was wondering if it is possible to create an attribute dynamically in my case would be the path string, composed by an absolute path (saved in some LibrePCB configuration) and the name of the datasheet (saved in the device attribute). So when I look at the properties of the symbol in the schematics I can see where the datasheet is stored.

Example:

absolute path: /home/giancarlo/librepcb/documentation/PDF/
document: LM7805.pdf

the attribute would be: /home/giancarlo/librepcb/documentation/PDF/LM7805.pdf

if I decide to move all the PDFs I only need to change the absolute path

I don’t know if this is already possible or if it could be a new feature

Gian Carlo

1 Like

Note that attributes should no longer be used for datasheets - we already implemented something more powerful in the file format to allow assigning datasheets and other resources to components. However, unfortunately it’s not yet implemented in the UI. Maybe I can try to implement it at least in a very basic way in the next release…

But currently it is designed to store URLs to online datasheets. The idea is that this way, only datasheets you actually opened will consume disk space. Then, any downloaded datasheet should be cached locally so you don’t need internet access to open it the next time (and it still works even if the URL breaks).

What do you think about this, would you be happy with this solution too? Or do you really want local-only datasheets?

I don’t need local-only datasheets, for me is enough that if the URL breaks there is a local stored copy in order to access it. It would be also nice that if I move to a new PC the possibility to export the documentation and import in the new one.
I have my librePCB library on a git repository so if the documentation would be in the same directory of the library I could use the same “up to date” library and documentation on different PC.This would be another possible solution.

Alright. I think I’ll then implement specifying an online URL in the UI and use caching of downloaded datasheets.

I agree, but it is more complicated than just using HTTP cache (which we have implemented already). So I’d first go with HTTP caching, and some day we could consider improving it to support the use-case of moving it to another computer. (theoretically the HTTP cache should also be movable but it’s not really designed to do that)

I had this in mind already several times. The big advantage is of course you don’t need internet connection for the datasheets of all installed libraries, and you don’t have any issues with broken URLs. However, I decided against this approach because it does not scale at all. For example, in our STMicroelectronics library there are ca. 1000 devices. If every device contains a datasheet of 2MB, it would increase library size by 2GB which is totally inacceptable – especially since most users only require maybe 5 of those datasheets. So we need a more efficient solution.

Of course for your personal library this problem doesn’t exist but I prefer to have one solution for both the official libraries and personal libraries.