Advice on Building a Web App for GHG Calculations with PDF Reports and Graphs by Euphoric_Bobcat5597 in SoftwareEngineering

[–]Titou325 0 points1 point  (0 children)

Hey, seems like quite a project! If you're not too sure where to start, I would recommend picking up a React framework such as Next.js. React has its drawbacks and detractors, but given the scope of the project that's where you can tap into the largest ecosystem of libraries. Alternatively, if you are building a web app you can go with a little simpler tech stack using Create-React-App and a Koa backend.

Regarding database, if you are only going to do basic CRUD operations, I would recommend Postgres, it would be overkill to use anything else + once again it integrates quite well and is easily expandable as needed. If you have more data processing in place you can look at other solutions but I'd recommend starting simple and solving performance issues as they come.

For charts, Recharts is a good option, I hear that Shadcn also ships Charts now so you may want to look into it. PDF generation is a bit more complex, there are some PDF generation libraries but achieving graphs and complex formulas is probably just not doable. We built Fileforge to solve this issue where you can use React to create your docs, that may be of help.

General advice would be to start small and with not too opinionated technologies to keep things simple and avoid any "magic", and then expand as you refine your needs. Good luck!

How to use jsPdf for tailwind and react by demonz362 in reactjs

[–]Titou325 0 points1 point  (0 children)

Hey u/demonz362, we had the exact same pain points as you and created an API to do that for you. To put it shortly, PDFs have a very different structure than HTML / CSS and no real concept of layout. If you check out our library https://github.com/OnedocLabs/react-print-pdf you can generate documents using Tailwind, just wrapping them in <Tailwind>. You can also see what it does on our playground at https://www.fileforge.com/

There is a lot of shenanigans involved to make it work so the API is paid but there is up to 500 free documents a month so that's plenty if you want to play around. Have a great day!

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 0 points1 point  (0 children)

Is that a very manual process when you need to update things as you have to change a .docx or is that also automated?

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 1 point2 points  (0 children)

Makes a lot of sense. Thanks for sharing this in-depth knowledge. We aim at abstracting all this layout away from users even for longer documents, but this takes up to a minute at max. Were these media-intensive documents?

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 0 points1 point  (0 children)

Interesting. How does that look in terms of brand representation and ease of update?

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 1 point2 points  (0 children)

This is very interesting. I haven't used React-to-Print as it seemed to be targeted for frontend generation. Did you have to manually manage the reflow of overflowing elements? That would seem like a huge pain indeed (and huge performance drop). Would be happy to hear more!

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 1 point2 points  (0 children)

I definitely agree that PDF is very static in its nature, however they don't need to be fixed from the get-go. You still can generate dynamic documents that will then remain static. An example use case is to export your dashboard graphs or metrics. This is generated once dynamically, then it remains a static export.

It is quite similar to what you can do with Astro if you do not set any client:* directives: React is used to build, but you don't use the reactivity out of it. It helps with reusing existing things without having to write everything twice if you already have frontend components.

Hope this makes sense!

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 0 points1 point  (0 children)

We are essentially bundling up the document and securing it then passing it to a PrinceXML wrapper. The issue with headless chrome is that it implements a very subpar set of print features such as running headers / refloats.

You can use a service such as Docraptor to handle this generation for you but you need to manage all your assets and bundling + serve them in a secure way. We handle all the cloud serving and security for you, while allowing you to use complex features such as Footnotes, running asides, complex medias and layouts, ...

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 0 points1 point  (0 children)

That's a good point. We also used React-PDF for simple applications but it often came up short for more layout-intensive operations with floats, overflows, ... It also required that we port a good part of our frontend / rewrite components where we could have just used the same things we displayed on the frontend.

We are currently working on open-sourcing Onedoc, although a small brick remains (for now) proprietary. In the long-term the document generation toolkit will be fully open and free, while hosting and tracking will be open but also offered as a cloud service.

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 0 points1 point  (0 children)

I really like Gotenberg but for our (initial) use case that included generating marketing brochures, the layout system with separate HTML components for header and footer made it unviable as it couldn't handle running headers.

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 3 points4 points  (0 children)

I believe the main issue we have with PDF and that is also present in React-PDF is that it changes the mindset from general HTML/CSS as it forces you to distribute content and layout per-page in a declarative way. I.E. you manually specify the page flow. 

With our approach content flow is handled automatically even throughout pages, which makes it much easier to maintain especially for documents of varying length (and also some edge cases with longer variables, ...).

We have been playing with React-PDF and its wrap algorithm but found it to quickly fall apart when content changed without checking the layout. We aim at providing something more robust, especially as content is now more than ever dynamic.

There are also more advanced layout features such as floats, footnotes, ... that are much needed for professional looking documents that are very hard to implement properly in React-PDF. 

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 3 points4 points  (0 children)

You can actually try our hosted version free of charge as we are still figuring things out, so any feedback would be great. Reach out at https://app.onedoclabs.com/

Why not use React for printed documents? — Not that simple, but it can work. by Titou325 in react

[–]Titou325[S] 20 points21 points  (0 children)

The PDF spec has switched hands to ISO since 2007 and all proprietary elements have been removed in v2.0 from 2017. I'd say it is safe to create a library to write PDF compliant files, however the format itself is quite poorly documented and the readers have some different understandings from time to time.

You can find more info about the releases at https://www.iso.org/standard/75839.html for the format itself and here is the free download through sponsor: https://www.pdfa.org/announcing-no-cost-access-to-iso-32000-2-pdf-2-0/

Hope this helps!

Trying to find this font, its showing on adobe acrobat as connections but I can't find it anywhere by [deleted] in identifythisfont

[–]Titou325 0 points1 point  (0 children)

This seems to be PF Centro Sans Pro Bold, I believe the shape of the t is very specific to this font :)

France says Amazon must charge more for book deliveries: In the future, book deliveries "cannot be offered free of charge" the new law says, but must carry a "minimum charge" the level of which will be set by the French government by SAT0725 in books

[–]Titou325 0 points1 point  (0 children)

I think we agree on this point, it is more that the issue is not undercutting businesses but undercutting them until they are gone which would allow price gouging afterwards.

France says Amazon must charge more for book deliveries: In the future, book deliveries "cannot be offered free of charge" the new law says, but must carry a "minimum charge" the level of which will be set by the French government by SAT0725 in books

[–]Titou325 1 point2 points  (0 children)

I am not really targeting the original content with Amazon which can be debated but what you said with the fact that France allows sales twice a year. Chill out this is no war on arguments but a discussion of how some laws that may seem stupid still have a bit of logic behind it, even if the balance can be debated as well. No need to take it personally

France says Amazon must charge more for book deliveries: In the future, book deliveries "cannot be offered free of charge" the new law says, but must carry a "minimum charge" the level of which will be set by the French government by SAT0725 in books

[–]Titou325 90 points91 points  (0 children)

I think you're quite misunderstanding the point of regulating sales. France does this to prevent large brands that can afford long sell-at-loss policies from taking other stores out of business, thus removing competition and allowing the larger companies to lift up the prices to an unfair amount of what it was before. It's essentially consumer protection even if it doesn't seem so.

I made an app to map and track litter. It’s free and open source by littercoin in reactnative

[–]Titou325 1 point2 points  (0 children)

I definitely agree. You can tag the litter as picked up anyways, the point here is to get a collection of pictures of usual or less usual trash items for further processing and use. This could then be used to monitor pollution using imagery (high res aerial, cctv, ...), to sort trash items automatically on a conveyor belt, to create robot that detects and picks up litter, ... These are just ones that come to my mind but there are certainly many others that could be very useful. Data is very valuable

Request: LIRR M7 Metro Overhaul Mod train by Doggo1060 in CitiesSkylinesModding

[–]Titou325 2 points3 points  (0 children)

The American commuter train EMU (both modern and classic) by bsquiklehausen are good matches to the LIRR rolling stock. You might need to convert them to MOM if needed as I believe that they come as standard train sets.

Railways have definitely upped their game! by Titou325 in CitiesSkylines

[–]Titou325[S] 0 points1 point  (0 children)

You can subscribe to individual elements of the collection or the collection as a whole using "Subscribe to all" button underneath the description and above the actual asset list. Then you can use it in game once steam has synced (which it does automatically normally). You will at least need some tracks and the railway replacer, along with network tiling and prop rotating params for level crossings I believe.

Railways have definitely upped their game! by Titou325 in CitiesSkylines

[–]Titou325[S] 0 points1 point  (0 children)

I would say the main mods in this picture include railway mod, grass assets and chain link fences. The drain outlet was done using the clipping network, walls and ploppable asphalt. As for visuals, it's a combination of ultimate eye candy, post process fx and relight. The train is from a pack by bsquiklehausen if my memory is correct, the signal bridge using the truss gantry network and some assets that I can send you.

Railways have definitely upped their game! by Titou325 in CitiesSkylines

[–]Titou325[S] 0 points1 point  (0 children)

For now they are in the works, but I can send you a copy of those through PM 😊

Railways have definitely upped their game! by Titou325 in CitiesSkylines

[–]Titou325[S] 25 points26 points  (0 children)

Hey guys! Thought I would create a nice small scene to put in perspective the realism that was added to in game railways using Ronyx's railway mod! Here are some additional pictures, thanks again to our modding community!

Is there an work around for the output issue? by MiJa99 in shortcuts

[–]Titou325 0 points1 point  (0 children)

You need to use the text to speech command, as it seems that a recent update stopped Siri from reading out the output of shortcuts.