Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

Feature Request: URLs to directly link to "view-pdf" a specific file

Open ASAujla opened this issue 1 year ago • 7 comments

I want to create a link that will open "<StirlingPDF_IP>:<StirlingPDF_Port>/view-pdf", but I want it to open a specific file on my network, rather than the default "Welcome to Stirling PDF Reader using PDF.js" file.

Apologies if this is already possible, I couldn't find a way to do it.

ASAujla avatar Mar 30 '24 23:03 ASAujla

Like embedding the path of the file to the URL so it loads that file?

sbplat avatar Mar 31 '24 03:03 sbplat

Yep, don't know how it would work, but something like this: http://<StirlingPDF_IP_Address>:<StirlingPDF_Port>/view-pdf?file=<file_path>

ASAujla avatar Mar 31 '24 21:03 ASAujla

The idea would be fine if it was all client sided. Since this is a server sided feature, clients can directly access files from the server which is probably a security concern. We could, however, set up a watch folder like the one from pipelines (so file access is limited).

sbplat avatar Mar 31 '24 22:03 sbplat

Hi, sorry for the delay... I'm not familiar with Pipelines as I'm quite new to Stirling PDF. Sounds interesting, though!

ASAujla avatar Apr 23 '24 16:04 ASAujla

@sbplat I think a more comprehensive and feature-like approach here would be:

  • SOMEHOW give a file to be loaded externally. This is part of a true UI integration with external systems. One can click "Edit PDF" next to a document row in a given system and somehow Stirling would be started with that file in mind only (to split, edit, whatever...)
  • Stirling's operation result (of merge, split, edit whatever) would then be sent to the external system (rather/in alternative to "downloading") and let the external system do whatever it needs to do with this new Stirling-output PDF/ZIP file.

This would make Stirling not a PDF editor, but an embeddable PDF editor.

oytuntez avatar Jul 03 '24 00:07 oytuntez

After some codebase exploration, just wanted to say this can also be done via the front UI/JS. Download the given URL (via query parameters, imagine a temporary file url given by external system) and use it in file inputs for various operations. When they are done, POST the file to a given external endpoint (possibly with all query parameters in the original request).

oytuntez avatar Jul 03 '24 00:07 oytuntez

We have no plans to add this at moment as our viewer is lacking functionality and we would need a client side application to handle the passing of files to server.

May be something we re-look at in future Will keep issue ticket open for awareness (please thumbs up ticket if you wish for this feature)

Frooodle avatar Dec 13 '24 13:12 Frooodle