943,553 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 40751
  • C# RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Sep 28th, 2007
0

Re: create pdf or word file from within c#

@ hollystyles

firstly thank you. although it is a bit to soon to speak, i believe that you have provided a solution.

i of course have to learn the arcane formatting but i believe that it cannot be more difficult than learning html.

just to be sure. csharp can do rtf and rtf has special formatting which i can learn from the link you posted and then the rtf file can be opened from word? if that is so then i believe you have helped me a lot.

about the other links. i did look at them but they were not very practical. couple of years and 2007 was just not an option. but thank you for your help. i believe the last link is just what i need. i really appreciate it.
Reputation Points: 33
Solved Threads: 1
Junior Poster
Ravenous Wolf is offline Offline
164 posts
since Aug 2007
Sep 28th, 2007
0

Re: create pdf or word file from within c#

Quote ...
csharp can do rtf and rtf has special formatting which i can learn from the link you posted and then the rtf file can be opened from word?
Ok just to split hairs. C# is just a language, the .NET framework has classes that can write text to the filesystem. RTF is text. So yes you can programitically create RTF files by programing the .NET framework using C# syntax as demonstrated yes.

Finally, yes Microsoft Word can open RTF files.

Best of luck with your solution. If you get stuck come back to this thread any time.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Sep 29th, 2007
0

Re: create pdf or word file from within c#

Hi,
I like the information in this thread. Like me friend in Australia I prefer to generate the pdf by myself, Now, Does anybody know how to generate 2D (Two Dimensions) bar code, like the one use by Fedex or UPS.

Thank you,
Reputation Points: 10
Solved Threads: 0
Newbie Poster
diegolo is offline Offline
1 posts
since Sep 2007
Oct 28th, 2007
0

Re: create pdf or word file from within c#

Just a suggestion - I code stuff that puts data into MS Office apps - PowerPoint, Excel and Word. You are better of doing it with VB then C#. We do all processing in C# and then use VB to create the documents at the end. With Word this does the table:
C# Syntax (Toggle Plain Text)
  1. Dim trange As Word.Range = _wordDocument.Paragraphs.Item(ParagraphCount()).Range
  2. _wordDocument.Tables.Add(trange, row, col)
Then you can literaly go cell by cell to edit the values

This inserts and formats paragraph of text
C# Syntax (Toggle Plain Text)
  1. With _wordDocument.Range.Paragraphs.Item(ParagraphCount()).Range
  2. .Text = "This is a simple text to be added as paragraph"
  3. .Font.Size = presOptions.FontSize
  4. .Font.Name = presOptions.FontFamily
  5. .Font.Italic = presOptions.Italic
  6. .Font.Bold = presOptions.Bold
  7. .Font.Underline = presOptions.Underlined
  8. .Font.Color = RGB(r, g, b)
  9. .Paragraphs.Alignment = alignment
  10. End With
in the above, pres options is not something I am willing to discuss in details but basically user's settings regarding formatting.

I am a big fan of C# but with office related stuff, VB is much easier. As far as PDF conversion goes - I did this by implementing someone else's libraries, I think it costed us something like $5000.00 for an unlilmited development licence, but saved me tons of work.
Reputation Points: 12
Solved Threads: 1
Newbie Poster
tostrinj is offline Offline
20 posts
since Jul 2007
Oct 28th, 2007
0

Re: create pdf or word file from within c#

Maybe he can try that XPS API I think it allows for programmatic reading writing of XPS and PDF and the new open Word format
Featured Poster
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
scru is offline Offline
1,624 posts
since Feb 2007
Oct 25th, 2010
0

How to create doc file inside folder

Reputation Points: 10
Solved Threads: 0
Newbie Poster
bbauraj is offline Offline
6 posts
since May 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Insert data from datagrid to access database
Next Thread in C# Forum Timeline: Fancy GUI





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC