opening and writing to a fillable pdf file

I am trying to open and write to a pdf file using

Page 1 of 1

2 Replies - 4735 Views - Last Post: 02 January 2011 - 10:56 AM Rate Topic: -----

#1 quinneh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-December 10

opening and writing to a fillable pdf file

Posted 24 December 2010 - 10:02 PM

I am new to vb.net. I am trying to open and write to a fillable pdf file using vb.net. Is this possible and if so can anyone point me in the right direction.

Thanks
Quinneh
Is This A Good Question/Topic? 0
  • +

Replies To: opening and writing to a fillable pdf file

#2 GenuineCodes  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 02-January 11

Re: opening and writing to a fillable pdf file

Posted 02 January 2011 - 10:44 AM

Have you tried the System.IO.StreamWriter?

Btw try to open the pdf file with Notepad, then see what it looks like in notepad. If it isn't encrypted then you could just use this:

Dim PdfReader As New System.IO.StreamReader("C:\Path\To\File.pdf")
Dim PdfWriter As New System.IO.StreamWriter("C:\Path\To\File.pdf")



Then you could just use PdfReader.Read and PdfReader.Write
I'm not sure if this will work, but it may help you.
Was This Post Helpful? -1
  • +
  • -

#3 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: opening and writing to a fillable pdf file

Posted 02 January 2011 - 10:56 AM

GenuineCodes, that's bull. PDFs do not open in notepad, and you can't use a streamreader/writer with it either.

OP, If you want to just diplay a PDF file, then right click the toolbox, and click "Choose items" (it might be "Add Items" in older versions of VB). Then click the "COM Components" tab, and then find the AxAcroPDF control. Add it to your form (a reference to AxAcroPDFLib will be added to your project). This will only work if you have Adobe Reader/Acrobat installed.

If you want to display & edit a .PDF file, then you might need to look into custom controls.

This post has been edited by Jack Eagles1: 02 January 2011 - 10:58 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1