bonjour,
l'impression des pdf avec un simple script est un grand classique pas toujours facile à résoudre surtout quand on veut éviter les solutions payantes

la solution que je vous propose ici nécessite trois étapes :
1° l'installation du composant dynawrap dispo ici: http://ourworld.compuserve.com/homep...SHDynaCall.htm
2° le téléchargement du freeware Sorax Reader ici: http://www.soraxsoft.com/_dwnl/SReadr.msi
3° le téléchargement du fichier PdfScript.dll écrit par votre serviteur
(voir fichier attaché)

après installation de Sorax Reader et enregistrement du composant dynawrap, placer le fichier PdfScript.dll dans le répertoire de Sorax ou dans le répertoire système
tester le script ci-dessous qui imprimera directement le fichier C:\Document 1.pdf sur l'imprimante "TinyPDF" (c'est un exemple )
le fichier SPDF.Ini est facultatif
valeurs de modeimpression:
0x0000 Default Mode ?
SPVPF_MODE_BMP 0x0001
Printing as a bitmap.
SPVPF_MODE_PS 0x0002
Printing as a PostScript.
SPVPF_PSF_LEVEL1 0x0008
Supporting the PS Level1 standard.
SPVPF_PSF_LEVEL2 0x0010
Supporting the PS Level2 standard.
SPVPF_PSF_LEVEL3 0x0020
Supporting the PS Level3 standard.

important: l'impression ne semble pas compatible avec les imprimantes réseau
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Option Explicit
Dim oApi,hD
Set oApi=CreateObject("DynamicWrapper")
oApi.Register "SPDF.dll","SPD_ResetConfig","f=c","i=s","r=l"
oApi.Register "SPDF.dll","SPD_Open","f=c","i=sss","r=l"
oApi.Register "SPDF.dll","SPD_GetPageCount","f=c","i=l","r=l"
oApi.Register "SPDF.dll","SPD_PrintDirect","f=c","i=lsllt","r=l"
oApi.Register "PdfScript.dll","InitDll","f=c","r=l"
 
oApi.SPD_ResetConfig "C:\SPDF.ini"
oApi.InitDll
' Open(<nomdufichier>,<motdepasseutilisateur>,<motdepassepropriétaire>)
hD=oApi.SPD_Open("C:\Document 1.pdf","","")
' PrintDirect(<HandleDoc>,<NomImprimante>,<1èrePage>,<dernièrePage>,<modeimpression>
If hD<>0 Then oApi.SPD_PrintDirect hD,"TinyPDF",1,oApi.SPD_GetPageCount(hD),0