PDF to JTextPane: you need a PDF viewer: php?id=22 2. The concept of lines is inexistent in PDF. This page provides Java code examples for The examples are extracted from open source Java projects. disregard.. i found some ideas from the internet. i just added this new line after creating the JScrollPane. ferredSize(new.

Author: Arashilar Mikinos
Country: Morocco
Language: English (Spanish)
Genre: Software
Published (Last): 20 February 2012
Pages: 174
PDF File Size: 11.16 Mb
ePub File Size: 5.15 Mb
ISBN: 918-1-69086-539-2
Downloads: 82723
Price: Free* [*Free Regsitration Required]
Uploader: Vikus

Creating PDF using JEditorPane

Jul 30, 2: I have used, a file. Sign up using Facebook. Use one PdfGraphics2D per page. Jul 31, 2: By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. You’ll have to post the question to the mailing list. I have found the reason that it’s blank, though I have yet to find a way to overcome it.

The method paintToPDF does the job correctly, however the Pane is parsed as a graphics2D component, and so wrapping the line is not possible. Thanks a lot for your help! I remember writing such an example in answer to a question on the official iText mailing list. Basically, it seems that it will only be written into the PDF after I close the pane.


iText – Creating PDF using JEditorPane

I assumed it would be possible. Rectangle; doc. You want to save the form of the editor pane or the text in it? PdfGraphics2D implements the Graphics interface.

While you are writing, you know the width, but not the length. Meanwhile, can you point me to some part where I can learn how to print the info jeditoepane JEditorpane into multiple page in the PDF?

Frakcool 7, 5 25 Concerning the first issue. I used setBorderColor java. Free forum by Nabble.

Как сохранить JEditorPane как PDF?

Can you make an example on how it should look like? Post as a guest Name. JEditorPane has a method paint Graphics g ; com. Aug 2, 1: Compare it with paper. There is a character kind: Jul 24, 5: I’ve tried doing it the below way, but cannot create the PDF successfully.

So there’s no Swing object that allows you to have a text editor with a fixed height. When I tried to open the PDF created, the message that is returned is: Hi, I resolved all the questions, but there are others 3 problems.


Hi Bruno, thanks for replying. PDF as a format is not designed to be easily editable. Jul 24, 6: Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that jeditoorpane continued use of the website is subject to these policies.

It’s probably still somewhere in the archives. Did I do my codes wrongly?

As described in my book: If there is no answer: