Skip to main content

[JAVA2D] Printable and Graphics2D

1 reply [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Peter B. West

Mark,

Thanks for the information. I downloaded the code, and after a few
minor glitches I got it to compile in NetBeans. Correct me if I'm
wrong, but your code takes an existing PDF file and prints it. I want to
go the other way: take the Java2D rendering commands coming into a
Graphics2D object, and create the corresponding PDF commands. I don't
actually want to "print" anything, but create a new PDF file. I'll
certainly look at your implementation of the print method.

BTW, I couldn't find your presentation at JavaOne 2005. Do you have a url?

Thanks.
Peter

mark stephens wrote:
> In message <43D3D13C.9010505@pbw.id.au> you wrote:
>
>
>>This is a follow-up on my questions about GraphicsEnvironment,
>>GraphicsDevice and GraphicsConfiguration.
>>
>>Reading the Printing with Printables section of the Programmer's Guide
>>to the Java 2D API, 1.4 edition, April 24 2001, I find that a Graphics
>>object is passed to the print method of Printable. Into this Graphics,
>>aka Graphics2D, I can render any Java2D primitives and higher structures.
>>
>>Looking for the environmental details of this Graphics2D, I find in the
>> discussion of javax..print.StreamPrintServiceFactory a reference to the
>>Service Provider Interface with a broken link. Hunting about, I find
>>some discussion of SPI in the page on jar files. I can find no other
>>documentation concerning the provision of print services. Is there any?
>>Does it discuss issues like setting up the GraphicsDevice,
>>GraphicsConfiguration and FontRenderContext? Is there an example?
>>
>>Peter
>
>
> Peter,
>
> We put out a GPL version of our PDF library to render PDF files which
> implements Printable and Pageable - details are at
> http://www.jpedal.org
>
> One of the reasons for doing this was to provide a detailled example
> of extending a JPanel and supporting printing - our talk from JavaOne
> 2005 was also on the subject and you should be able to download the
> slides.
>
> If you look in the class org.jpedal.PdfDecoder, you will find
> printable there.
>
> Regards,
>
> MArk
> ---

--
Peter B. West
Folio
---
[This E-mail has been scanned for viruses but it is your responsibility
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".