Newsgroup: it.comp.lang.visual-basic
Titolo: Creazione file PDF

Salve,
e' possibile con 
VB.NET
 creare un pdf solo testuale?
Sapreste dirmi se il linguaggio lo permette nativo oppure devo utilizzare
qualcosa a pagamento?
Grazie
xoooox
--------------------------------
Inviato via 
http://arianna.libero.it/usenet/

 utilizzare qualcosa a pagamento?
Puoi usare questa libreria GPL
http://www.ujihara.jp/iTextdotNET/en/
Sul sito, troverai decine di esempi sull'utilizzo.
Saluti
-- 
Gianluca Cannalire
Microsoft MCP - Visual Basic
http://www.visual-basic.it
http://community.visual-basic.it/gianluca

 qualcosa a pagamento?
Nativo no. Qui: 
http://www.luigimicco.altervista.org/
 puoi trovare
una classe specifica, in due versioni, una, freeware, più limitata
e l'altra a pagamento più completa.
Vedi se ti va bene.
Bye, G. 

 qualcosa a pagamento?
C'è anche questa, open source e anche utilizzata da SharpDevelop per i 
report:
http://www.pdfsharp.com/
-- 
news:it-alt.comp.software.openoffice : Il newsgroup dedicato a
OpenOffice.org, la suite open source di applicazioni per ufficio.
Saluti, VITRIOL


Grazie per il sito...
Non ho capito una cosa...
Quando creo un nuovo progetto ed inserisco nelle prime linee (come esempi
visti su google):
   Imports PdfSharp
   Imports PdfSharp.Drawing
   Imports PdfSharp.Pdf
   Imports 
PdfSharp.Pdf.IO
Il compilatore mi da il seguente errore:
Warning 1 Namespace or type specified in the Imports 'PdfSharp' doesn't
contain any public member or cannot be found. Make sure the namespace or the
type is defined and contains at least one public member. Make sure the
imported element name doesn't use any aliases.
D:\
VB.NET
\WindowsApplication1\WindowsApplication1\Form1.vb 1 9
WindowsApplication1
Dove sbaglio?
Come devo fare per linkare le librerie?


 Come devo fare per linkare le librerie?
Devi referenziarle. Basta fare Project > Add reference... > Browse, e 
selezionare la libreria che ti interessa.



Ho provato a scrivere il seguente codice:
Imports System
Imports com.lowagie.text
Imports com.lowagie.text.pdf
Imports System.IO
Public Class Form1
  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
    Console.WriteLine("Chapter 1 example 1: Hello World")
    ' step 1: creation of a document-object
    Dim document As New Document()
    ' step 2:
    ' we create a writer that listens to the document
    ' and directs a PDF-stream to a file
    PdfWriter.getInstance(document, New FileStream("Chap0101.pdf",
FileMode.Create))
    ' step 3: we open the document
    document.open()
    ' step 4: we add a paragraph to the document
    'document.add(New Paragraph("Hello World"))
    ' step 5: we close the document
    document.close()
  End Sub
End Class
Ho referenziato le seguenti librerie:
  BouncyCastle.Provider.dll
  Gnu.Classpath.Core.dll
  Gnu.Classpath.JAXP.dll
  iTextAsian.dll
  iTextdotNET.dll
  iTextHYPH.dll
  JUnit.dll
Pero' quando lancio l'applicazinone mi da problemi su questa linea di
codice:
  Dim document As New Document()
System.TypeInitializationException was unhandled
  Message="The type initializer for 'com.lowagie.text.Document' threw an
exception."
  Source="iTextdotNET"
  TypeName="com.lowagie.text.Document"
  StackTrace:
       at com.lowagie.text.Document..ctor() at
WindowsApplication1.Form1.Button1_Click(Object sender, EventArgs e) in
D:\WindowsApplication1\WindowsApplication1\Form1.vb:line 12 at
System.Windows.Forms.Control.OnClick(EventArgs e) at
System.Windows.Forms.Button.OnClick(EventArgs e) at
System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at
System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button,
Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at
System.Windows.Forms.ButtonBase.WndProc(Message& m) at
System.Windows.Forms.Button.WndProc(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at
System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam) at
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData) at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context) at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context) at
System.Windows.Forms.Application.Run(ApplicationContext context) at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine) at WindowsApplication1.My.MyApplication.Main(String[] Args) in
.vb:line 81 at System.AppDomain._nExecuteAssembly(Assembly assembly,
String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args) at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at
System.Threading.ThreadHelper.ThreadStart_Context(Object state) at
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state) at
System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.IO.FileNotFoundException
       FileName="vjslib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ba"
       FusionLog=""
       Message="Could not load file or assembly 'vjslib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03a' or one of its dependencies. The system
cannot find the file specified."
       Source="iTextdotNET"
       StackTrace:
            at com.lowagie.text.Document..cctor()
       InnerException: System.IO.FileNotFoundException
            FileName="vjslib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=ba"
            FusionLog="=== Pre-bind state information === LOG: User = test LOG:
DisplayName = vjslib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b0a (Fully-specified) LOG: Appbase =
file:///D:/WindowsApplication1/WindowsApplication1/bin/Debug/ LOG: Initial
PrivatePath = NULL Calling assembly : iTextdotNET, Version=1.4.2263.4222,
Culture=neutral, PublicKeyToken=bd39c3. === LOG: This bind starts in default
load context. LOG: No application configuration file found. LOG: Using
machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config. LOG:
Version redirect found in framework config: 1.0.5000.0 redirected to
2.0.0.0. LOG: Post-policy reference: vjslib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03a LOG: Attempting download of new URL
file:///D:/Private/Personal/Programmazione/
VB.NET/WindowsApplication1/WindowsApplication1/bin/Debug/vjslib.DLL
.
LOG: Attempting download of new URL
file:///D:/Private/Personal/Programmazione/
VB.NET/WindowsApplication1/WindowsApplication1/bin/Debug/vjslib/vjslib.DLL
.
LOG: Attempting download of new URL
file:///D:/Private/Personal/Programmazione/
VB.NET/WindowsApplication1/WindowsApplication1/bin/Debug/vjslib.EXE
.
LOG: Attempting download of new URL
file:///D:/Private/Personal/Programmazione/
VB.NET/WindowsApplication1/WindowsApplication1/bin/Debug/vjslib/vjslib.EXE
.
"
            Message="Could not load file or assembly 'vjslib, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b033a' or one of its dependencies. The
system cannot find the file specified."
            InnerException:
Non ho capito se manca la : vjslib pero' non so dove recuperarla o ha
problemi con questa libreria com.lowagie.text.Document
Sapresti dirmi dove sbaglio?


 Sapresti dirmi dove sbaglio?
Non sbagli nulla... ti manca solo il runtime .NET di J#
Infatti, iText, è scritta in J#
Puoi scaricare il runtime dal seguente link:
http://msdn.microsoft.com/en-us/vjsharp/bb188598.aspx


qualcosa a pagamento?
Non ho capito cosa intendi per solo testuale, comunque i reporting
services di VS2005 supportano l'esportazione anche in PDF.
Ciao
-- 
Fritz
Togli *ERASE* per rispondere in e-mail.


Finalmente ho creato il primo pdf...
Grazie mille
