Projet

Général

Profil

Development #74796

connecteur PDF : ajout de webservices « watermark »

Ajouté par Thomas Noël il y a environ un an. Mis à jour il y a environ un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
23 février 2023
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

Description

De la doc de pdftk, reprendre les 4 possibilités background, multibackground, stamp et multistamp

          background <background PDF filename | - | PROMPT>
                 Applies a PDF watermark to the background of a single input PDF.  Pass the background PDF's filename after background like so:

                 pdftk in.pdf background back.pdf output out.pdf

                 Pdftk uses only the first page from the background PDF and applies it to every page of the input PDF.  This page is scaled and rotated as needed to fit the input page.
                 You can use - to pass a background PDF into pdftk via stdin.

                 If the input PDF does not have a transparent background (such as a PDF created from page scans) then the resulting background won't be visible – use the stamp operation
                 instead.

          multibackground <background PDF filename | - | PROMPT>
                 Same as the background operation, but applies each page of the background PDF to the corresponding page of the input PDF.  If the input PDF has more pages than the
                 stamp PDF, then the final stamp page is repeated across these remaining pages in the input PDF.

          stamp <stamp PDF filename | - | PROMPT>
                 This behaves just like the background operation except it overlays the stamp PDF page on top of the input PDF document's pages.  This works best if the stamp PDF page
                 has a transparent background.

          multistamp <stamp PDF filename | - | PROMPT>
                 Same as the stamp operation, but applies each page of the background PDF to the corresponding page of the input PDF.  If the input PDF has more pages than the stamp
                 PDF, then the final stamp page is repeated across these remaining pages in the input PDF.

L'appel à chacun des 4 webservices aura toujours la même forme :

{
    "filename": "output.pdf",  # nom du fichier à retourner
    "in": {"content": ...},    # contenu du PDF à tamponner
    "stamp" ou "background": {"content": ...}  # contenu du tampon, si absent on prendra self.stampfile
}

Et donc, avoir en plus dans la configuration du connecteur un fichier stampfile (default background/stamp) qui sera le tampon par défaut à appliquer.

Révisions associées

Révision 2ac7a1c9 (diff)
Ajouté par Thomas Noël il y a environ un an

pdf: add watermark endpoint (#74796)

Historique

#1

Mis à jour par Thomas Noël il y a environ un an

  • Sujet changé de connecteur PDF : ajout de webservices à connecteur PDF : ajout de webservices « watermark »

A la reflexion, plutôt un seul webservice "watermark" et la possibilité d'envoyer une clé "mode" dans l'appel, qui précisera stamp, multistamp, background, multibackground... Et par défaut, ça sera multistamp (qui me semble le plus utile).

#3

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de Nouveau à Solution proposée

Thomas NOËL (tnoel) a ouvert une pull request sur Gitea concernant cette demande :

#4

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de Solution proposée à Solution validée

Paul Marillonnet (pmarillonnet) a approuvé une pull request sur Gitea concernant cette demande :

#5

Mis à jour par Robot Gitea il y a environ un an

  • Statut changé de Solution validée à Résolu (à déployer)

Thomas NOËL (tnoel) a mergé une pull request sur Gitea concernant cette demande :

#6

Mis à jour par Transition automatique il y a environ un an

  • Statut changé de Résolu (à déployer) à Solution déployée
#7

Mis à jour par Transition automatique il y a 11 mois

Automatic expiration

Formats disponibles : Atom PDF