🚀 Launching PDF WorkDesk - an open-source web app for your PDF needs!

:rocket: Excited to announce the launch of PDF WorkDesk - an open-source web app for your PDF needs! :page_facing_up::sparkles:

As a Streamlit and Python enthusiast, I’m thrilled to share my latest creation with you. PDF WorkDesk is a Streamlit-powered web app designed to make your PDF editing experience seamless and user-friendly.

Here’s what you can do with PDF WorkDesk:

  • :arrows_counterclockwise: Upload PDFs from disk or load directly from a URL
  • :mag: Preview PDF contents and metadata
  • :open_book: Extract text and images with ease
  • :closed_lock_with_key: Encrypt/decrypt for security
  • :arrows_counterclockwise: Rotate, resize, merge, and convert PDFs to Word
  • :clamp: Reduce file size without compromising quality

And the best part? It’s completely open-source and respects your privacy - no personal information required! :white_check_mark:

:handshake: I’m continuously working on adding more features and would love to hear your feedback. If you have any suggestions or would like to contribute, PRs and issues are welcome.

:link: Try it out now: https://pdfworkdesk.streamlit.app/

:star: If you find it useful, please consider starring the repository on GitHub to support my work: GitHub - SiddhantSadangi/pdf-workdesk: A Streamlit-powered application that provides a user-friendly interface for editing PDF documents.

Looking forward to your thoughts and contributions! :hugs:

14 Likes

I would suggest the following for SEO. Add a summary of what it is below the header.

Feature request:

  • add a full pdf viewer, not just a preview.
1 Like

Thanks for the suggestions and feature request.
I’ve added them to the backlog and will include them in the next release! :white_check_mark:

@ferdy I’ve made the SEO updates as suggested :rocket:
image

Regarding the feature request, were you referring to having the previewer in the main canvas rather than the sidebar, or using another widget altogether to view the PDFs?

A pdf viewer in the main is what i like. Perhaps remove the previewer in the sidebar. I dont fully understand the presence of a preview in the sidebar.

Siderbar

Minimize widgets in the sidebar. Avoid designing the sidebar that forced users to scroll.

@ferdy
I had initially kept the previewer so that users could get a quick glance at the PDF they have loaded. especially when its loaded from a URL.

But your suggestion also makes sense. Instead of crowding the sidebar, I can move the preview to the main canvas.

Would you suggest moving the other input components (file uploader, text input, etc) to the main canvas as well?

Should the app force dark mode? In “normal” white mode sidebar text is not very visible. From my side: I like the preview but agree with Ferdy that there is a lot going on on the sidebar :wink:

This has been a major pain point for me, too :confused:

Since I use custom HTML (st.components.v1.html()), I haven’t been able to figure out a way to render the text well in both light and dark mode. This is also a small reason why I prefer to have a longer sidebar, as otherwise, the bottom section with custom HTML looks horrible in the previews :sweat_smile:

Any suggestions on how I could fix this? All my other apps could also use this.

there is a lot going on on the sidebar

I will be moving the previews to the main canvas. That should clean the sidebar up a bit.

Thanks for the feedback! :hugs:

Maybe try to always force dark mode? :slight_smile: I do something like that in “The dungeon” if you will try to change mode to white it will stay dark :wink: Overall your app is great stuff. I will definiately use it!

1 Like

How do you do that? Just by setting base="dark" in config.toml?

ah ok… found style.css. Because of the number of components I’ve used, might take a while to override all styles :smiley:

But I’ll get to it eventually, I hope :crossed_fingers:

Meanwhile, would absolutely love it if you could submit a PR to help me out a bit :pleading_face:

1 Like

Yup I am using both base="dark" and come css hacks as I remember this part did the trick:

.stApp {
    background: #0e1117;
}

div.stTabs button {
    background: #0e1117;
}

.stApp header {
    background: #0e1117;
}

I had tried this, and it worked okay for the main canvas (the caption became too dark to read), but it didn’t affect the sidebar.

I also tried .stSidebarContent { background: #0e1117 }, but that didn’t have any effect.

Can you help me with the name of the sidebar element?

Hi! There are two options to change sidebar background.

  1. Modify config.toml for custom theme:
[theme]
base="dark"
secondaryBackgroundColor="#FFA421"
  1. CSS injection:
section[data-testid=stSidebar] {
    background-color: #0e1117;
}
1 Like

@TomJohn
Thank you; this helped a lot!

I am using the below CSS file:

:root {
    --primary: #FF4B4B;
    --background: #0e1117;
    --text: #fafafa;
    --secondary: #262730;
}

.stApp {
    background: var(--background);
    color:var(--text);
    color-scheme: dark;
}
 
div.stTabs button {
    background: var(--background);
    color:var(--text);
}

.stApp header {
    background: var(--background);
    color:var(--text);
}

section[data-testid=stSidebar] {
    background: var(--secondary);
    color:var(--text);
}

h1, h2, h3, ul{
    color:var(--text);
}

.console-container {
    background: var(--background);
    color:var(--text);
}

The result is definitely better, but I am still not able to figure out all the elements I need to apply the styles to:

Is there a guide or something I can refer to?

Maybe instead of “fighting” with every single style you can change the theme to custom and then hide the ability to change theme by using

[client]
toolbarMode = "minimal"

?

1 Like

@TomJohn - ah, yes, that’s exactly what I was looking for!
Thank you so much! :bowing_man:

Now on to remove the sidebar clutter :broom:

1 Like

@ferdy , @TomJohn
I just updated the app with a decluttered sidebar. How does it look now?
PDF WorkDesk · Streamlit

Of course, many more improvements are needed from a layout and performance perspective, but the codebase is currently a mess, and the following primary task will be to refactor it before making further significant changes.

Yeah. It’s very very nice now :slight_smile:

However I managed to break it with https://www.eiopa.europa.eu/system/files/2020-12/solvency2-factsheet.pdf

@TomJohn - These warnings seem to come from Angular ( angular - ngx-extended-pdf-viewer Error: Invalid Canvas Size after update to version 18.1.10 - Stack Overflow) when the smaller previews embedded in the subsequent expanders are triggered.

However, I was still able to use the app as usual and preview the PDF in all expanders even after dismissing these errors.

Did you notice any functionality breaking?