Superposer 2 fichiers pdf

Fermé
poisson1980 - Modifié le 17 août 2018 à 12:14
 poisson1980 - 17 août 2018 à 13:58
Bonjour,
Je souhaite produire un fichier pdf (donnees.pdf) en superposition d'un autre (modele.pdf).
Comme si j'avais imprimé successivement modele.pdf puis donnees.pdf.

Le fichier donnees.pdf est issu d'une page html, pour laquelle j'ai défini une css d'impression avec le fond transparent pour que la page modele.pdf apparaisse bien
* {
background-color: transparent;
}


J'imprime la page depuis mon navigateur (Firefox) vers le fichier pdf.

Je superpose les 2 fichiers avec
pdftk donnees.pdf background modele.pdf output superposition.pdf


J'obtiens le fichier superposition.pdf
Mais hélas la transparence n'a pas fonctionné.

Je ne sais pas si c'est le fichier donnees.pdf qui n'est pas transparent (comment savoir?) ou si c'est pdftk qui n'a pas pris en compte la transparence.

Merci d'avance pour votre aide.

A voir également:

1 réponse

zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 6 407
17 août 2018 à 12:21
Salut,

Essayer plutôt avec
stamp
à la place de
background


Extrait du man pdftk :

          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.



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.

0
Merci.
J'ai essayé

pdftk modele.pdf stamp donnees.pdf output superposition.pdf

Mais le résultat est le même.
Donc c'est mon fiichier donnees.pdf qui n'est transparent.
Pourtant je l'ai indiqué dans la css. Il doit se passer quelque chose au niveau de l'impression par le navigateur.
0