• Post Reply Bookmark Topic Watch Topic
  • New Topic

getting error in programatically created pdf

 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is Ramesh. I am creating pdf document using file IO streams. after created it, i am trying to opening the pdf document but error message is showing as " There was an error opening this document.The file is damaged and could not be repaired"



I have created pdf document using this code.
can any one please tell me is it correct way or any other way for creating pdf document.


Thanks & Regards
Ramesh K
 
Yves Zoundi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using a PDF library or are you just writing some text and naming a file with the .pdf extension?
 
Norm Radder
Bartender
Posts: 1526
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try renaming the file you've written to be a text file (.txt) and try to open it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!