Free Support Forum - aspose.com

Div in Html is not getting reflected properly when rendered to document as a stream

I am using Pega, i created an Html stream with 'Div's each with specified margins and positions...individually. The html is properly coming in the Explorer. But the document is not giving proper html reflection of the same. It does not take into regard of all margin-top style, etc. But all the 'div' boxes are coming after another down wards...not taking margin-top into the account, but they are shifted to the left as specified by margin-left alone.

what could be the problem?

Pls help me out guys? :/ :/ :/

Hi Anu,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input HTML.
  • Please

    create a standalone/runnable simple Java application that demonstrates the code (Aspose.Words code) you used to generate
    your output document

  • Please share to which file format you are saving your output document.
  • Please attach the output document that shows the undesired behavior.
  • Please
    attach your target document showing the desired behavior.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

The HTML used here is:












































construction area %
ISO 6/AA sd sdgs
ISO 5/A sd sdgs
ISO 4/B sd sdgs
ISO4 CMD/C sd sdgs
NC /B sd sdgs
ISO3 CMD/C sd sdgs
MJ /C sd sdgs
Frame /D sd sdgs
TOTALS sd sdgs
































LOCATION VALUES (USD)
gh sdf
gh sdf
gh sdf
gh sdf
gh sdf
gh sdf
gh sdf
gh sdf
gh sdf







IP (months)
sdgs











Latitude
sdgs
Longitude
sdgs







Explosion Hazard Properly Protected
gg











































gh sdf sdg
gh sdf sdg
gh sdf sdg
gh sdf sdg
gh sdf sdg
gh sdf sdg
gh sdf sdg
gh sdf sdg
gh sdf sdg
gh sdf sdg






nnn sdgs






nnn sdgs









nnn sdgs
nnn sdgs













































LOSS ESTIMATE SUMMARY (USD)
    sdf sdg gh gh gh gh
MAS sdf sdg gh gh gh gh
MFL sdf sdg gh gh gh gh
PML sdf sdg gh gh gh gh
NLE sdf sdg gh gh gh gh





























PROTECTION
gh gh
gh gh
gh gh
gh gh
gh gh
gh gh
gh gh
gh gh






Human Element Rating for Linesetting sdfgdasa






Engineering Source gh

















































gh
gh gh gh gh
gh gh gh gh
gh gh gh gh
gh gh gh gh
gh gh gh gh
gh gh gh gh
gh gh gh gh
gh gh gh gh
gh gh gh

Location Comments






Hi

I have tried to render the html attached into word doc, and hence into Pdf, using Aspose Words. It uses Div tags to map tables positioned individually & separately… Pls refer to the desired n undesired outputs, attached to you as a screen shot n generated Pdf file respectively.

Hi Anu,

Thanks for sharing the detail. Please note that Aspose.Words mimics the same behavior as MS Word does. If you load your input document in MS Word and convert it to Pdf/Docx, you will get the same output. So, this is the expected behavior of Aspose.Words.

Hi Tahir,

Actually I am unable to reflect that in Word itself, forget the Pdf. Whereas for the given Html i should be able to get the desired Word Doc. So my question is why the Html is getting reflected anomally in .the Docxument generation alone?

It is well showing in the explorer..but what's wrong with the same when tried to put into a document :/ ?

Hi Anu,


Thanks
for your inquiry. Please note that Aspose.Words mimics the same behavior as
MS Word does.
Aspose.Words and MS Word generate the same output. However, I have logged a feature request as WORDSNET-10813 for your scenario. Our development team will look into the
possibility of implementation of this feature. Once we have
any information about this feature, we will update you via this forum thread.

Please let us know if you have any more queries.

Hi Anu,


Thanks
for your patience. It is to update you that our development team has completed the
analysis of this issue and has come to a conclusion that they won’t be
able to implement the fix to this issue. Most likely, your issue will be
closed with ‘‘Won’t Fix’’ resolution. MS Word and HTML have different positioning models, MS Word doesn’t have a counterpart for absolute positioned HTML divs.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan