Re: Applying CSS to the HTML

Hi is this still in Beta,
this does not work for me.

<html>
<head>
    <title>persondiv</title>
    <style type="text/css">
        .label {
            float: left;
            width: 100px;
        }

        </p > <p > .outputtext {
            float: left;
            width: 300px;
        }

        </p > <p > .clear {
            clear: both;
        }
    </style>
</head>
<body>
    <p>test1</p>
    <div class="label">password</div>
    <div class="outputtext">theoutputtext</div>
    <div class="clear" />
    <div class="label">password3</div>
    <div class="outputtext">theoutputtextdsafsdadfas</div>
</body>
</html>

I’m actually using Aspose.WORDS to do my conversion

LoadOptions options = new LoadOptions();
options.setLoadFormat(LoadFormat.HTML);
try {
    newDocument = new Document(dataStream, options);

and then saving the document as a pdf would I be better off using .PDF
Thanks
Anthony

Hi Anthony,

As you are using Aspose.Words to convert HTML file PDF format, I am moving this thread to respective forum. My fellow workers taking care of this product would be in better position to answer this query.

Hi Anthony,

Thanks for your inquiry. Please note that Aspose.Words tries to mimic the same behavior as MS Word do. If you convert your html to PDF by using MS Word, you will get the same output. I have attached both output PDF files generated with MS Word and Aspose.Words with this post.

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.