I am using 3.6.1 version of dll. I have already pasted the html in my original message. I am pasting it again below.WHen I paste my HTML code, your editor converts teh code into html preview form. Can't understand what do you mean by sending the code thru attachmnet.Can't see any option of attachment in forum.
Here is the HTML:
B/S MR
Kundesenter
Reisedokument - Travel Document
Flygning - Flight
Reisende - Traveller
1303 15 Jun 2006 (08:55)
1303 15 Jun 2006 (08:55)
Avreise
Departure
10:55 London Stansted (STN)
Ankomst
Arrival
12:00 Oslo Gardermoen (OSL)
Booking oppdatert
Booking updated
08 Jun 2006 (13:04)
Bagasje
Baggage
Max. 8 kg håndbagasje/cabin baggage Max. 20 kg fribagasje/free baggage allowance
You have not post the HTML as attachment so we copy the HTML and paste it into a new file. We have not found the error when testing the file. If you can’t attach file, you can send the files to tommy.wang@aspose.com. Please also include the resulting pdf. Which language are you using in your system? Have you tried the latest hotfix of Aspose.Pdf?
Thanks for your response. I was trying that in windows application. Anyways could you please help me with following 3 queries:
1)Though original html has images, same has not been included in the pdf. Does that mean images will not be transferred to pdf.
2)We need to include a footer on each page of pdf, how can I do that ? Could you please send me a sample code for that. I searched on your site and appears that it is possible for text. But I need to do that in the same html file that you just used.
3)How can I add bookmarks.
Please note that I need to achieve this using BindHtml only as I will be passing html file to the method.
In my test, if the image file (“d:\PDF\PASNGR.gif”) exist, the image is included in the pdf. If the image is not exist, it is ignored.
Here is an example to add a footer:
pdf1.BindHTML(@“D:\test\test.html”);
//add a footer
HeaderFooter hf = new HeaderFooter();
hf.Paragraphs.Add(new Text("footer"));
pdf1.Sections[0].OddFooter = pdf1.Sections[0].EvenFooter = hf;
pdf1.Save(@"d:/test/test.pdf");
The bookmark function in Aspose.Pdf is based on headings so it can’t be used when converting HTML to Pdf. You can add the bookmark using Aspose.Pdf.Kit. Please refer to Create Bookmarks.
I probably figured out why image was not appearing, it was becasue I used align attribute in . When are you planning to support attributes like: align, style and div. It is very cumbersome to place font in each and evry cell of table whereas we want whole tabel to have same font.
Another query: I need to put a horizontal line just above my footer on every page. Line class is there but it seems it works with Graphs only...
//add a footer HeaderFooter hf = new HeaderFooter();
//add a line Graph graph1 = new Graph(450,5); Line l1 = new Line(new float[]{0,3,450,3}); graph1.Shapes.Add(l1); hf.Paragraphs.Add(graph1);
//you can also add a line using tab stop Text t1 = new Text("#$TAB"); t1.TabStops = new TabStops(); TabStop stop1 = t1.TabStops.Add(450,TabLeaderType.Solid); hf.Paragraphs.Add(t1);
//add a text hf.Paragraphs.Add(new Text("footer")); pdf1.Sections[0].OddFooter = pdf1.Sections[0].EvenFooter = hf;