Sign In  Sign Up Live-Chat

HTML to PDF convertion

Last post 08-07-2008, 7:41 AM by codewarior. 2 replies.
Sort Posts: Previous Next
  •  08-07-2008, 2:39 AM 138683

    HTML to PDF convertion

    Hi ,

    I am trying to convert from HTML to PDF using below code but i am getting PDF file without contents and getting AsposeBaseException also  ,

    Please send the source code(JAVA) if u have..ASAP

     try{
                 
                 Pdf pdf = new Pdf();
                 File helloHtml=new File("c:/temp/htmlex.html");
                 
                 pdf.bindHTML(new FileInputStream(helloHtml),helloHtml.toURL());
                 pdf.save(new FileOutputStream(new File("c:/temp/HtmlExample.pdf")));
                 
          }catch(java.io.IOException ioe){
           System.out.println(ioe.getMessage());
          }catch(AsposeBaseException e){
           System.out.println(e.getMessage());
          }

     

    Reagrds

    Ramesh.K

     

     
  •  08-07-2008, 3:08 AM 138692 in reply to 138683

    HTML to PDF convertion

    Attachment: Present (inaccessible)

    I am trying to convert from HTML to PDF using below code but i am getting PDF file without contents and getting AsposeBaseException also  ,

    Please find the attached HTML file(htmlex.zip).

    Please send the source code(JAVA) if u have..ASAP

     try{
                
                 Pdf pdf = new Pdf();
                 File helloHtml=new File("c:/temp/htmlex.html");
                
                 pdf.bindHTML(new FileInputStream(helloHtml),helloHtml.toURL());
                 pdf.save(new FileOutputStream(new File("c:/temp/HtmlExample.pdf")));
                
          }catch(java.io.IOException ioe){
           System.out.println(ioe.getMessage());
          }catch(AsposeBaseException e){
           System.out.println(e.getMessage());
          }

     

    Reagrds

    Ramesh.K

     
  •  08-07-2008, 7:41 AM 138733 in reply to 138692

    Re: HTML to PDF convertion

    Hello Ramesh,

    We apologize for your inconvenience. I have tested the issue using same code that you have provided and I’m able to reproduce the same problem. Currently HTML 2 Pdf conversion is in beta phase and some of the features may not function properly.
    Secondly the HTML file that you have shared is using some css, Let me share with you some thing, Cascading Styles Sheet (CSS) is not supported.

     

    Our team of developers is working hard to improve HTML2Pdf conversion feature, but I am afraid we cannot support it in short time. Sorry once again.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
View as RSS news feed in XML