aspose-words / Aspose.Words-for-Java

Aspose.Words for Java examples, plugins and showcases
https://products.aspose.com/words/java
MIT License
402 stars 206 forks source link

DocumentPreviewAndPrint not finished ? #34

Closed xdenser closed 4 years ago

xdenser commented 8 years ago

Does not work for me.

Exception in thread "main" java.awt.IllegalComponentStateException: contentPane cannot be set to null. at javax.swing.JRootPane.setContentPane(JRootPane.java:620) at javax.swing.JFrame.setContentPane(JFrame.java:693) at com.aspose.words.examples.rendering_printing.PrintPreviewDialog.init(PrintPreviewDialog.java:106) at com.aspose.words.examples.rendering_printing.PrintPreviewDialog.(PrintPreviewDialog.java:91) at com.aspose.words.examples.rendering_printing.DocumentPreviewAndPrint.main(DocumentPreviewAndPrint.java:49)

aspose-words commented 8 years ago

@xdenser Thank you for raising the issue and we apologize for this.

We are looking into this issue and will get back to you with some updates soon.

Please stay tuned.

naeem244 commented 8 years ago

@xdenser ,

There is issue in PrintPreviewDialog class which has been raised via concerned forum. We will update here once the issue is resolved. Please follow this thread for further updates: http://www.aspose.com/community/forums/715492/printpreviewdialog-class-is-throwing-error-contentpane-cannot-be-set-to-null-documentpreviewandprint/showthread.aspx#715492"

kp144 commented 8 years ago

Getting The stack is full. the file having A table and multiple row/cell into table which may contains Shapes,Text and images.

Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalStateException: The stack is full. at com.aspose.words.zzZ5O.zzZ(Unknown Source) at com.aspose.words.zzZQP.zzX(Unknown Source) ... 622 more Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: The stack is full. at com.aspose.words.zzZST.zzZ(Unknown Source) at com.aspose.words.zzZ12.zzW(Unknown Source) at com.aspose.words.zzZ12.zzZ(Unknown Source) at com.aspose.words.zzZ5O.zzZ(Unknown Source) at com.aspose.words.zzZ5O.zzZ(Unknown Source) ... 623 more Caused by: java.lang.IllegalStateException: The stack is full. at com.aspose.words.zzZAY.push(Unknown Source) at com.aspose.words.zzBI.zzOZ(Unknown Source) at com.aspose.words.zzZR5.zzOZ(Unknown Source) at com.aspose.words.zzZ36.zzS9(Unknown Source) at com.aspose.words.zzZ5B.zzH(Unknown Source) at com.aspose.words.zzZST.zzZ(Unknown Source) ... 627 more

saqibmasood commented 8 years ago

@kp144 Thanks for writing back and we apologise for inconvenience. We are working on the issue. Please share the input file that you are using for this example. It will help us to investigate it quickly.

kp144 commented 8 years ago

i want to crop each row/cell to an image as it's shown in Ms-Word Table.!

On Tue, Jun 28, 2016 at 2:03 AM, Saqib Masood notifications@github.com wrote:

@kp144 https://github.com/kp144 Thanks for writing back and we apologise for inconvenience. We are working on the issue. Please share the input file that you are using for this example. It will help us to investigate it quickly.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspose-words/Aspose.Words-for-Java/issues/34#issuecomment-228866646, or mute the thread https://github.com/notifications/unsubscribe/APLtL_hvB9MQ8bFIQVQau3kAjrmxDBIBks5qQDOigaJpZM4IKfiS .

Thanks & Regards Kuldeep Choudhary

saqibmasood commented 8 years ago

@kp144 I shall try this use-case at my end and let you know. If you have tried it, I appreciate if you can share the code.

kp144 commented 8 years ago

In this method RenderRowToImage(String dataDir, Document doc)

Row row = (Row) doc.getChild(NodeType.ROW, 0, true);

this line is used some parameter as per my knowledge the 0 is used to crop 0th index row or cell of table,when i change 0 into 2 then it works but when i use 1 instead of 0 then its throws an exception stack is full and many more...

here my requirement is that i will count the number of rows into the table and after that i will iterate each rows and convert the whole data which is contain by a Cell/Row into an image.. if any query then please contact me... Please help me

Thank's

On Wed, Jun 29, 2016 at 12:50 AM, Saqib Masood notifications@github.com wrote:

@kp144 https://github.com/kp144 I shall try this use-case at my end and let you know. If you have tried it, I appreciate if you can share the code.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspose-words/Aspose.Words-for-Java/issues/34#issuecomment-229154020, or mute the thread https://github.com/notifications/unsubscribe/APLtL_AyId-iKgWK-0WCsumhG1oxfpg4ks5qQXP0gaJpZM4IKfiS .

Thanks & Regards Kuldeep Choudhary

saqibmasood commented 8 years ago

@kp144 Thanks for sharing more info. I shall get back to you soon.

kp144 commented 8 years ago

Here is My StackTrace

On Wed, Jun 29, 2016 at 11:49 AM, Saqib Masood notifications@github.com wrote:

@kp144 https://github.com/kp144 Thanks for sharing more info. I shall get back to you soon.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspose-words/Aspose.Words-for-Java/issues/34#issuecomment-229266686, or mute the thread https://github.com/notifications/unsubscribe/APLtL_22Ek3c4VZCuT-TqHgD63O41m73ks5qQg5lgaJpZM4IKfiS .

Thanks & Regards Kuldeep Choudhary

kp144 commented 8 years ago

i also want to getPosition(X,Y) of each shapes so i can draw the shape on image by using that position.

tilalahmad commented 7 years ago

@xdenser,

In reference to your printing issue, please change "DocumentPreviewAndPrint.PrintPreviewDialog" to "PrintPreviewDialog" in the "PrintPreviewDialog.form" using some text editor, as you can see in the attached picture.

We have also updated the examples as well.

fix