Sign In  Sign Up Live-Chat

Convert xml+xsl to PDF and create a PDF table of contents?

Last post 09-11-2007, 7:23 AM by forever. 15 replies.
Page 1 of 2 (16 items)   1 2 Next >
Sort Posts: Previous Next
  •  08-31-2007, 2:16 PM 93138

    Convert xml+xsl to PDF and create a PDF table of contents?

    I have an xml and xsl. Using these files I want to convert to PDF and I also want to have a table of contents which links to each section. How can this be accomplished using .Pdf .NET?

    Thanks,
    Dan

     
  •  09-01-2007, 3:51 PM 93183 in reply to 93138

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Hi,

    Thank you for considering Aspose.

    To convert XSL-FO to Pdf or XML+XSL to pdf please refer to function BindFO of Aspose.Pdf. To apply Table of Contents(TOC) please refer to:
    http://www.aspose.com/Wiki/default.aspx/Aspose.Pdf/ 

    Please check links under:"Working with Headings"
    http://www.aspose.com/Wiki/default.aspx/Aspose.Pdf/SpecifyHeadingLevelAndAutoSequencing.html

    Now, in you case when you call Pdf.BindFO() method in your code then you need to get Sections by calling the function GetObjectByID. After getting the section then you can apply Headings(TOC). Hope it helps.

    If you need more help, please do let us know.

    Thanks.


     
  •  09-04-2007, 6:15 AM 93358 in reply to 93183

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Thank you, that explanation should help a lot.  I'll try it all out today.

    UPDATE:

    I've tried researching and testing based on the info provided above, but being new to Aspose.Pdf perhaps I am missing some fundamental understanding of how it works. 

    Your API states that content created using BindFO cannot be modified using the API.  Please advise.

    Dan

     
  •  09-04-2007, 1:48 PM 93457 in reply to 93358

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Hi,

    It means that we are giving the utility to convert FO to PDF. We can also produce the Pdf using Aspose.Pdf programmatically. Means we can create objects like Paragraphs, Table etc and using API we can manipulate them during the creation of PDF. In this case we directly convert it into PDF and we can't make any changes. For e.g if I add one table using Aspose.Pdf API and I wanted to change the color of cells in alternate rows then we can do incase of FO to PDF but we can perform this activity using Aspose.Pdf API.

    If you need more help. Please do let us know.

    Thanks.

     
  •  09-04-2007, 1:58 PM 93460 in reply to 93457

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Can I work with someone over IM on this?  I'm not seeing how I can modify the PDF after I've used BindFO

    Dan

     
  •  09-04-2007, 5:18 PM 93492 in reply to 93460

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Hi Dan,

    I am there on IM support right now, but I don't think that we can manipulate the documents if you are using XSL-FO to PDF.

    Thanks.

     
  •  09-05-2007, 6:24 AM 93564 in reply to 93492

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Then how about this.. I can open the XML doc and loop through each node for which I will place a PDF TOC entry?  Cna I bind XML multiple times for a single document?
     
  •  09-05-2007, 7:07 AM 93569 in reply to 93183

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Would you be able to provide a simple working example of XML and XSL files which would create a TOC when using bindFO or bindXML?
     
  •  09-05-2007, 9:20 AM 93612 in reply to 93569

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Hi,

    I have discussed this with the develovers. It appears that Aspose.Pdf can not convert a XML+XSL to PDF and create a TOC for it at the same time. Also the API manipulating PDF documents does not work for FO parts. So, if you are going to use XSL to convert your XML to pdf then a TOC cannot be added. How ever if you loop through your XML and use the API to convert to PDF then you can add TOC entries in it but you will have to convert the whole XML in this way.

    Thanks.

     
  •  09-05-2007, 10:31 AM 93635 in reply to 93612

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Thank you for checking.

    Does bindHTML() support HTML bookmarks? I tried a test of this and an external link to google.com worked but an HTML bookmark within the document did not work.

    If HTML bookmarks would convert properly then that is all I would need to create my own PDF TOC.

     
  •  09-05-2007, 11:00 AM 93641 in reply to 93635

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    So I just tried to convert a simple HTML file which contains HTML bookmarks and it is causing bindHTML() to fail.

    Here is the HTML:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>
    <meta http-equiv="Content-Language" content="en-us" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>test 1</title>
    </head>

    <body>

    <p><strong>TABLE OF CONTENTS</strong></p>
    <p><a href="#Test_1">Link 1</a></p>
    <p><a href="#Test_2">Link2</a></p>
    <p><a href="#Test_3">Link3</a></p>
    <p><a href="#Test_4">Link4</a></p>
    <p><a href="#Test_5">Link5</a></p>
    <p>&nbsp;</p>
    <p><strong>CONTENT</strong></p>
    <p><a name="Test_1">Test 1</a></p>
    <p><a name="Test_2">Test 2</a></p>
    <p><a name="Test_3">Test 3</a></p>
    <p><a name="Test_4">Test 4</a></p>
    <p><a name="Test_5">Test 5</a></p>

    </body>

    </html>

     
  •  09-05-2007, 11:25 AM 93649 in reply to 93641

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Hi,

    I was able to reproduce the error. I will check with the developers and we will inform you of a solution as soon as possible.

    Thanks.

     
  •  09-06-2007, 10:17 AM 93792 in reply to 93641

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Hi,

        Thank you for considering Aspose.Pdf. We are trying to fix it by next Monday, Sept.10th.


    Cynthia Hu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-10-2007, 12:27 PM 94251 in reply to 93641

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Hi DanB,

    We have fixed the bug. Please click follow link to download the new release:
    http://www.aspose.com/Community/Files/

    Best regards.


    Hans Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-11-2007, 7:08 AM 94399 in reply to 94251

    Re: Convert xml+xsl to PDF and create a PDF table of contents?

    Thank you!  Does this also mean conversion of HTML bookmarks will convert to PDF links?
     
Page 1 of 2 (16 items)   1 2 Next >
View as RSS news feed in XML