Ho trovato
Public Sub cConvertFile(ByVal InputFilename As String, ByVal OutputFilename As String, Optional ByVal SubFormat As String = "") ' Allowed values for 'SubFormat': "PDF/A-1b" for "PDF/A-1b"files; "PDF/X" for "PDF/X"-files
sul sito http://de.pdfforge.org/content/clspdfcreator
c'è qualche informazione ma non riesco proprio a far venir fuori il mio PDF/A
riporto il codice che utilizzo per la stampa
codice:
Public Sub cConvertFile(ByVal Filetyp As String, Optional ByVal SubFormat As String = "PDF/A-1b")
Dim fname As String, fi As FileInfo, DefaultPrinter As String
Dim opt As PDFCreator.clsPDFCreatorOptions
With OpenFileDialog1
.Multiselect = False
.CheckFileExists = True
.CheckPathExists = True
'.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
End With
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
fi = New FileInfo(OpenFileDialog1.FileName)
If InStr(fi.Name, ".", CompareMethod.Text) > 1 Then
fname = Mid(fi.Name, 1, InStr(fi.Name, ".", CompareMethod.Text) - 1)
Else
fname = fi.Name
End If
' If Not _PDFCreator.cIsPrintable(fi.FullName) Then
'MsgBox("File '" & fi.FullName & "' is not printable!", MsgBoxStyle.Exclamation, Me.Text)
' Exit Sub
' End If
opt = _PDFCreator.cOptions
With opt
.UseAutosave = 1
.UseAutosaveDirectory = 1
.AutosaveDirectory = fi.DirectoryName
.AutosaveFormat = Filetyp
.
If Filetyp = 5 Then
.TIFFResolution = 72
End If
opt.AutosaveFilename = fname
End With
With _PDFCreator
.cOptions = opt
.cClearCache()
DefaultPrinter = .cDefaultPrinter
.cDefaultPrinter = "PDFCreator"
.cPrintFile(fi.FullName)
ReadyState = False
.cPrinterStop = False
End With
With Timer1
.Interval = maxTime * 1000
.Enabled = True
Do While Not ReadyState And .Enabled
Application.DoEvents()
Loop
.Enabled = False
End With
If Not ReadyState Then
MsgBox("Creating printer test page as pdf." & vbCrLf & vbCrLf & _
"An error is occured: Time is up!", MsgBoxStyle.Exclamation, Me.Text)
End If
_PDFCreator.cPrinterStop = True
_PDFCreator.cDefaultPrinter = DefaultPrinter
End If
opt = Nothing
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
cConvertFile(0)
End Sub
HELP..
Fabio