Path desired in iTextsharp (remote)

0

With this code I can create the document and assign it a path in the temporary files:

   string nombre = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".pdf";

And I think the document:

    Document doc = new Document(PageSize.A4, 50, 50, 25, 25);

We create the stream to write the document:

  PdfWriter.GetInstance(doc, new FileStream(nombre, FileMode.Create));

We open the Doc:

    doc.Open();

We do things in the pdf.

We close the doc:

    doc.Close();

We print the doc:

    Process prc = new System.Diagnostics.Process();
    prc.StartInfo.FileName = nombre;
    prc.Start();

Well, my question is, how could I do that, if the application is on a server and it is executed via net, have the path assigned in a folder "Downloads" for example, and the pdf be printed in the PC that is running the app.

Simple question:

How do I assign a local path while the app is remote?

    
asked by Geraniego 05.06.2017 в 20:35
source

1 answer

0

If the application is on the server, the client "downloads" the program and executes it "local". So the routes will be local, so do not worry.

On defining the folder, you can use Environment.SpecialFolder ... for example for my documents:

Environment.SpecialFolder.MyDocuments
    
answered by 06.06.2017 в 01:45