Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to convert any file to .pdf using Adobe PDF Printer ?

How to convert any file to .pdf using Adobe PDF Printer ?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netcomadobewindows-admin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krushna Sahu
    wrote on last edited by
    #1

    Hi, I've an application developed in ASP.Net to convert any file to pdf file using PDF Printer. In the .aspx page I've kept one button control and in the click event I've written : protected void Button1_Click(object sender, EventArgs e) { try { System.Diagnostics.Process printProcess = new System.Diagnostics.Process(); printProcess.StartInfo.FileName = "E:\\Krushna.doc"; printProcess.StartInfo.Verb = "printto"; printProcess.StartInfo.Arguments = "\"Adobe PDF\""; printProcess.StartInfo.WindowStyle = ProcessWindowStyle.Minimized; printProcess.StartInfo.CreateNoWindow = true; printProcess.Start(); printProcess.Dispose(); } catch (Exception ex) { throw ex; } } I've set the PDF Printer to my default printer. In the properties of the PDF Printer, in the Port tab, I've set the port to "My Document\*.pdf " . It will save the .pdf file to My Document. I'm using ASP.Net 2.0 with IIS 5.1 installed. The issue is : This is working fine while running the application directly(i.e. the Krushna.doc file is converting to Krushna.pdf and save to My Document Folder) . But when the application running from IIS, it is asking to save the pdf file i.e. one save dialog window is opened. But I need to directly save the pdf file to the My Document Folder. Please reply...It is urgent requirment. Thank you.

    --Krushna Chandra Sahu prfkrushna@gmail.com

    Y 1 Reply Last reply
    0
    • K Krushna Sahu

      Hi, I've an application developed in ASP.Net to convert any file to pdf file using PDF Printer. In the .aspx page I've kept one button control and in the click event I've written : protected void Button1_Click(object sender, EventArgs e) { try { System.Diagnostics.Process printProcess = new System.Diagnostics.Process(); printProcess.StartInfo.FileName = "E:\\Krushna.doc"; printProcess.StartInfo.Verb = "printto"; printProcess.StartInfo.Arguments = "\"Adobe PDF\""; printProcess.StartInfo.WindowStyle = ProcessWindowStyle.Minimized; printProcess.StartInfo.CreateNoWindow = true; printProcess.Start(); printProcess.Dispose(); } catch (Exception ex) { throw ex; } } I've set the PDF Printer to my default printer. In the properties of the PDF Printer, in the Port tab, I've set the port to "My Document\*.pdf " . It will save the .pdf file to My Document. I'm using ASP.Net 2.0 with IIS 5.1 installed. The issue is : This is working fine while running the application directly(i.e. the Krushna.doc file is converting to Krushna.pdf and save to My Document Folder) . But when the application running from IIS, it is asking to save the pdf file i.e. one save dialog window is opened. But I need to directly save the pdf file to the My Document Folder. Please reply...It is urgent requirment. Thank you.

      --Krushna Chandra Sahu prfkrushna@gmail.com

      Y Offline
      Y Offline
      Yusuf
      wrote on last edited by
      #2

      you joking, are you? if you are serious about converting files to pdf using a free tool look at Ghostscript [^]

      Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

      K 1 Reply Last reply
      0
      • Y Yusuf

        you joking, are you? if you are serious about converting files to pdf using a free tool look at Ghostscript [^]

        Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

        K Offline
        K Offline
        Krushna Sahu
        wrote on last edited by
        #3

        Hi Yusuf, Thank you for your reply. I'm not joking. Have you checked the code given? If not, then please check and reply me.

        --Krushna Chandra Sahu prfkrushna@gmail.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups