Show pageOld revisionsBacklinksAdd to bookExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== FDF ====== Dato un modello pdf e un file in formato FDF viene creato il documento pdf utilizzando pdftk <file txt dati.fdf> %FDF-1.2 1 0 obj <</FDF<</F<</Type/Filespec/F()/UF()>> /Fields[ <</T(nome_cognome_destinatario)>> <</T(Entecreditore)>> <</T(Causale)/V(@causale)>> <</T(cbill)/V(@cbill)>> <</T(cf_ente)>> <</T(codice_avviso1)>> <</T(Scadenzaentro1)/V(@scadenzaentro1)>> <</T(Scadenzaentro2)/V(@scadenzaentro2)>> <</T(importo1)/V()>> <</T(numero_cc_postale)/V()>> <</T(importo2)/V()>> <</T(intestatario_conto_corrente_postale)/V()>> <</T(autorizzazione)/V()>> <</T(Causale1)/V()>> <</T(Causale2)/V(@Causale2)>> <</T(codice_avviso2/V())>> ]>>>> endobj trailer <</Root 1 0 R>> %%EOF </file> {{ :tips:modello.pdf }} <code> pdftk modello.pdf fill_form dati.fdf output output.pdf </code> Per aggiungere immagini come loghi o qrcode in determinate posizioni si può usare pdftk multistamp esempio <code bash> #!/bin/sh # valore del qr code QR1='PAGOPA|002|123456789012345678|12345678901|1234567801' # il modello non contiene i campi qr MODEL=modello.pdf FDF=dati.fdf # generiamo il pdf solo con i campi testo pdftk $MODEL fill_form $FDF output bg.pdf # generiamo il qr come immagine qrencode -s3 -o qrcode.png $QR1 # generiamo una pagina trasparente A4 e posizionamo il qr nella posizione 200 da sinistra e 500 dal basso convert qrcode.png -transparent white -page a4+200+500 -quality 100 fg.pdf # uniamo background e foreground in final.pdf pdftk bg.pdf multistamp fg.pdf output final.pdf </code> tips/fdf.txt Last modified: 2021/02/26 19:28by scipio