Free Support Forum - aspose.com

Exception when converting doc to html

I'm using aspose licensed version (version 11.8.1) to convert doc to html. I have a requirement to convert all .png images in the document to jpg, hence I'm using ImageCallBack event for the same. However, if a document contains objects like textbox, it is giving me below exception while saving the textbox as image. Can you help me?


System.NullReferenceException: Object reference not set to an instance of an obj

ect.

at x4adf554d20d941a6.xccb7c729140ed2d4.get_x2c8c6741422a1298()

at x4adf554d20d941a6.x6d3ade29d016f4ea.x209132eac59b91dd(x56410a8dd70087c5 x3

bdd6d9796b259c5, xf0b374f4c0172a4c x268076ae4d2d65dd)

at x4adf554d20d941a6.x6d3ade29d016f4ea.x58c64f348653f92a()

at x4adf554d20d941a6.x6d3ade29d016f4ea.x5f6867bc5a977cb1()

at x4adf554d20d941a6.x6d3ade29d016f4ea.xc3819e13f60dd8e6(xf6937c72cebe4ad1 x3

11e7a92306d7199, Int32 xbfb9ad5ef64f6dc5)

at x4adf554d20d941a6.x20de8d9377d7de69.xc3819e13f60dd8e6(xf6937c72cebe4ad1 x3

11e7a92306d7199)

at x4adf554d20d941a6.x09e62a55cab70965.x5de571cf1cd1652c(xf6937c72cebe4ad1 x3

11e7a92306d7199)

at x4adf554d20d941a6.x09e62a55cab70965.xc3819e13f60dd8e6(xf6937c72cebe4ad1 x3

11e7a92306d7199, Int32 xcd3a9f82634fe5f9)

at x4adf554d20d941a6.x71da84fff8849445.xc3819e13f60dd8e6(x53cb1139c5c64ee6 xd

7e5673853e47af4, Int32 xcd3a9f82634fe5f9, Boolean x3175070523842c98)

at x4adf554d20d941a6.x4ddd0723770f9758.xb47a6df2eae4ba51()

at x4adf554d20d941a6.x4ddd0723770f9758.xc3819e13f60dd8e6(x3d1ad8ce75f0db3a xd

3311d815ca25f02, Int32 xd284dd7d525c5491, Boolean x3175070523842c98, Boolean x40

97fa47409be495)

at x4adf554d20d941a6.xa6c6ed003f022075.xc3819e13f60dd8e6(x86accec882b7012a xe

6de5e5fa2d44af5, Boolean xc1dedf23e1bdce60)

at x4adf554d20d941a6.x36d44214ff2c1e83.xc3819e13f60dd8e6(x694f001896973fe3 xa

806b754814b9ae0)

at x4adf554d20d941a6.x71da84fff8849445.xc3819e13f60dd8e6(x53cb1139c5c64ee6 xd

7e5673853e47af4, Int32 xcd3a9f82634fe5f9, Boolean x3175070523842c98)

at x4adf554d20d941a6.x4ddd0723770f9758.xb47a6df2eae4ba51()

at x4adf554d20d941a6.x4ddd0723770f9758.xc3819e13f60dd8e6(x3d1ad8ce75f0db3a xd

3311d815ca25f02, Int32 xd284dd7d525c5491, Boolean x3175070523842c98, Boolean x40

97fa47409be495)

at x4adf554d20d941a6.x3f7228e953be72ed.xd79114a9e7bc0d9e()

at x4adf554d20d941a6.x3f7228e953be72ed.xc3819e13f60dd8e6(x852fe8bb5ac31098 xe

3e287548b3d01f5, Int32 xd284dd7d525c5491)

at x4adf554d20d941a6.x4af2add38e634ad4.xcbc2273143eac9ec(x852fe8bb5ac31098 xb

6842aa1e60562e1)

at x4adf554d20d941a6.x4af2add38e634ad4.xc3819e13f60dd8e6(xc7f90d9c7c51cede xb

be2f7d7c86e0379)

at x4adf554d20d941a6.xea876d525d28ff96.xc3819e13f60dd8e6(x398b3bd0acd94b61 xd

7e5673853e47af4)

at x4adf554d20d941a6.xac6c82c74ce247fb.xc3819e13f60dd8e6(Boolean xfad304b5f8f

3bb5b)

at x4adf554d20d941a6.xa268fdb9ca040dde.xc3819e13f60dd8e6(Boolean xfad304b5f8f

3bb5b)

at x4adf554d20d941a6.x4e2f8bff72d83f71.xc3819e13f60dd8e6()

at x59d6a4fc5007b7a4.xcde671c53995c411.xd9db07500873ae98(Document x3664041d21

d73fdc, xdeb77ea37ad74c56 xdfde339da46db651)

at Aspose.Words.Document.UpdatePageLayout()

at Aspose.Words.Document.x410db0f4a89a6ef1(Boolean x24af0daafcd8fb8c)

at x3d94286fe72124a8.xc958d22004253850.xe0bb10192c142499(x7721ad963b03c6eb x8

d3f74e5f925679c, x54b98d0096d7251a x57fef5933b41d0c2)

at Aspose.Words.Rendering.ShapeRenderer..ctor(ShapeBase shape)

at Aspose.Words.Drawing.ShapeBase.GetShapeRenderer()

at AsposeSample.HtmlImageExportCallback.ImageSaving(ImageSavingArgs args) in

D:\Practice\AsposeSample\AsposeSample\Program.cs:line 91

Hi Dipak,


Thanks for your inquiry. Could you please attach your input Word document along with simplified code here for testing? I will investigate the issue on my side and provide you more information.

Best Regards,