take6056@feddit.nltoProgramming@programming.dev•[help] Are there tools for documents manipulating that can provide an approximate size of components (text included)?
5·
10 months agoI would look into a library that does manipulation of odt (or docx). Code whatever algorithm you need to do the restructuring. Now your left with an in memory representation of the document that you can hopefully figure out how many pages it spans, or save it to a temporary file.
All depends really on how feature rich the odt libraries are and/or how deep you want to dive into the spec.
I feel like this is an XY problem. Is there an underlying issue your trying to resolve?
Another Many-to-many example within this usecase would be “subscriptions”. Users can subscribe to multiple channels and channels can have multiple users subscribed to them. You would use another relational table that stores the channel_id & user_id, with uniqueness for both together, since “being subscribed to one specific channel multiple times” doesn’t make sense and perhaps put a column to store “hitting the bell” in there too.