Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Writing to Ms Word File |
Post Reply |
Author | |
MoneyRan
Beginner Joined: 11 Aug 11 Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 11 Aug 11 at 10:59PM |
Hi,
In my program I am opening a Word .doc document, using DrawText to write information on it and then save it sing SaveToFile function.
When I open the file in MSWord, all the text that I worte is visible, but on the top and bottom, there is some header adn footer information which loks like garbage. Is there any way to remove that or make it invisible?
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
A bit curious ;-) DrawText (and the whole QuickPDF-lib) is made for pdf-creation and not for word-documents. Cheers and welcome here, Ingo |
|
MoneyRan
Beginner Joined: 11 Aug 11 Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Actually, what I am writing in the file is completely HTML. I tried writing it on PDF, but it comes up as HTML code. I looked up the DrawHTMLText, but apparently it does not support all the tags, hence the Word Document. I have been looking in the function reference for a function that will allow me to modify these headers and footers, but nothing yet.
|
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Can you post a code sample so we can see what you are doing ? As Ingo mentioned Quick PDF Library does not work with Word Documents. Could it be that you are using MS Word to save your document to PDF and then using Quick PDF to load the PDF file and add extra text to it ? Andrew.
|
|
MoneyRan
Beginner Joined: 11 Aug 11 Status: Offline Points: 15 |
Post Options
Thanks(0)
|
I want to write a whole User Control to a file. This is what I am doing:
Convert the Control to HMTL:
Dim SB As New StringBuilder()
Dim SW As New StringWriter(SB) Dim htmlTW As New HtmlTextWriter(SW) States1.RenderControl(htmlTW) Dim DataGridHtml As String = SB.ToString() Try to print the HTML on a document:
This is what I had been doing: 'Dim open As Integer = QP.LoadFromFile(path + filename + ".doc")
Dim writer As StreamWriter QuickPDf wrote HTML perfectly to an MS Word document along with some garbage Headers and Footers. Edited by MoneyRan - 12 Aug 11 at 6:15PM |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Again:
QuickPDF is for pdf not for html or doc. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store