I'm writing Pdf file using PdfGraphics2D. Can I add graphics object
inside some pdf construct which can have name (like Chunk , Anchor). I
want to add cross link (hyper link) capability and have name will make
it easy.
Thanks In Advance
Ajay
--
I'm using PdfGraphics2d to export PDF file from my swing application. I
want to add some cross-reference from one graphics of one page to
another graphics on another page.
Without changing my existing rendering code much, what's the best way to
do it ?
Regards
Ajay
Ludger Buenger wrote:
> Therefore I attached a second patch containg such an image cache
> a) reducing PDF size and b) reducing processing time when creating
PDFs significantly.
This sounds very interesting. I'd like to take a look at it,
and integrate it into the next iText release, but before
Hi Bruno, Hi Paulo,
We make extensive use of the Graphics2D interface to various destinations and
discovered some issues with iText we intend to share.
First regarding the drawString(AttributedCharacterIterator):
Using iText I discovered that some Java TextAttributes are only partially
implem
Mike Korcynski wrote:
> I'd like to do it the same way I add hyperlinks where I specify a
> rendering hint to the graphics object with the text of the tooltip and
> have the tooltip added to the object on the PDF.
I meant: show me some Graphics2D code (plain Java code without iText).
I'm not a G
I'd like to do it the same way I add hyperlinks where I specify a
rendering hint to the graphics object with the text of the tooltip and
have the tooltip added to the object on the PDF.
-Mike
1T3XT info wrote:
> Mike Korcynski wrote:
>
>> Hi,
>>
>> I'm using PdfGraphics2D to render a PDF fro
Mike Korcynski wrote:
> Hi,
>
> I'm using PdfGraphics2D to render a PDF from my swing app, I've been
> able to add hyperlinks using PdfGraphics2D.HyperLinkKey, but I was
> wondering if there's a similar way to just add text tooltips to certain
> objects on the pdf as well? I tried just adding
Hi,
I'm using PdfGraphics2D to render a PDF from my swing app, I've been
able to add hyperlinks using PdfGraphics2D.HyperLinkKey, but I was
wondering if there's a similar way to just add text tooltips to certain
objects on the pdf as well? I tried just adding text using the
Hyperlink renderin
Mark Storer wrote:
> Add the following line to PdfGraphics2D.create() (insert before line
> 904, though the exact position doesn't really matter):
>
> g2.rhints.putAll( this.rhints );
Thanks, I've changed this in the SVN repository:
> Log Message:
> ---
> Bugfix posted on the mailing
Add the following line to PdfGraphics2D.create() (insert before line
904, though the exact position doesn't really matter):
g2.rhints.putAll( this.rhints );
While I was at it, I noticed several other members aren't copied:
currentFillGState
currentStrokeGState
underline
paintFill
paintStroke
al
Done.
Paulo
- Original Message -
From: "Bill Ensley" <[EMAIL PROTECTED]>
To: "'Post all your questions about iText here'"
Sent: Wednesday, August 20, 2008 10:08 PM
Subject: [iText-questions] PdfGraphics2D Patch
I just downloaded the latest version
I just downloaded the latest version of iText and
a patch has been added to PdfGraphics2D since my last version.
It is in the drawString method, line 431 and attempts to simulate a bold
font.
This new patch does not check to see if the current color has transparency
and so renders in full color
Post a small example so that the problem can be reproduced.
Paulo
- Original Message -
From: "jeffupt" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, April 01, 2008 8:18 PM
Subject: [iText-questions] PdfGraphics2D Issue
>
> I'm using the iText Graphics2D implem
I'm using the iText Graphics2D implementation to render monotone images to a
PDF file. These images consist of only 1 color, with empty spots in the
image being completely transparent.
The problem arises when the single color is pure black ( 0, 0, 0, 255 ). The
image is completely transparent in
Indeed, you are correct. I had copied the PDF generating part of the
code from an example, and had not changed the width and height of the
output.
Thanks!
Paulo Soares wrote:
> It's not the text that is too big, it's the graph that is too small. The
> font alignments are done using the Graphic
[EMAIL PROTECTED]>
To:
Sent: Thursday, January 10, 2008 9:46 PM
Subject: [iText-questions] PdfGraphics2D fonts are twice the size of
Java2Dfonts
>I am using PdfGraphics2D to write a JFreeChart to PDF.
>
> iText scales the text significantly larger in the PDF file than it
> appears i
I am using PdfGraphics2D to write a JFreeChart to PDF.
iText scales the text significantly larger in the PDF file than it
appears in a Java window. For example, the tick mark labels down the
sides of my chart overlap in the PDF file, but they are practically
double-spaced in the original chart.
Thank you, it's in the CVS.
Paulo
- Original Message -
From: "John Hellerud" <[EMAIL PROTECTED]>
To:
Sent: Friday, April 20, 2007 11:34 PM
Subject: [iText-questions] PdfGraphics2D issue and solution forhorizontially
scaled fonts
> Hello,
>
> Issue:
Hello,
Issue:
The PdfGraphics2D.drawString() method doesn't support fonts with a
TextAttribute.WIDTH setting that does not equal 1.0f.
History:
Most of the reports that I need to render are based on output originally
designed for a line printer with a 10, 12, 16.66 or 17.75 cpi width
font. U
That's fixed in the CVS, see if it works for you.
Paulo
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Oliver Flege
> Sent: Tuesday, April 10, 2007 8:04 AM
> To: [email protected]
> Subject: [iTex
Hi,
I stumbled about the following problem: Our graphics rendering software
needs to get the current Composite attribute from the Graphics2D object.
Unfortunately, PdfGraphics2D's getComposite method always returns null
although an attribute "composite" exists in that class and is updated
wheneve
your questions about iText here
Subject: Re: [iText-questions] PdfGraphics2D and specific Paint
PdfGraphics2D transforms unknown Paint into BufferedImage so when user is
zooming the Pdf file, it's an image zoom, pixelized, it's not very
elegant...
- Original Message -
From: Bil
y
To: 'Post all your questions <mailto:[email protected]>
about iText here'
Sent: Wednesday, January 03, 2007 7:02 PM
Subject: Re: [iText-questions] PdfGraphics2D and specific Paint
There is no technical hurdle to this, but the trouble is at some point that
unk
anuary 03, 2007 7:02 PM
Subject: Re: [iText-questions] PdfGraphics2D and specific Paint
There is no technical hurdle to this, but the trouble is at some point that
unknown paint needs to be converted into instructions for PDF.
I think that PdfGraphics2D does a fairly elegant job of hand
will
probably make it into the distribution.
-Bill Ensley
Bear Printing
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of NCA
Sent: Wednesday, January 03, 2007 8:56 AM
To: Post all your questions about iText here
Subject: [iText-questions] PdfGraphics2D and specific Paint
Hello,
Is it possible to wrap a specific Paint in the PdfGraphics2D with a specific
class or function to draw a shape, as it is done for the GradientPaint ?
ex :
g2.setPaint ( new MyPaint () );
=>
private void setPaint(boolean invert, double xoffset, double yoffset, boolean
fill)
{
...
- Original Message -
From: "Katz, Neal" <[EMAIL PROTECTED]>
To: "'Paulo Soares'" <[EMAIL PROTECTED]>; "Katz, Neal"
<[EMAIL PROTECTED]>;
Sent: Wednesday, March 01, 2006 1:45 PM
Subject: RE: [iText-questions] PDFGraphics2D
@lists.sourceforge.net
Subject: Re: [iText-questions] PDFGraphics2D and Swing borders
That's not fixed. It's a drawing order problem caused by create().
- Original Message -
From: "Katz, Neal" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, February 28, 2006 10:21 PM
Subject: [iText-qu
That's not fixed. It's a drawing order problem caused by create().
- Original Message -
From: "Katz, Neal" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, February 28, 2006 10:21 PM
Subject: [iText-questions] PDFGraphics2D and Swing borders
Hi,
I'
Hi,
I'm using an old version of iText (downloaded in 2004) without any of the fancy
API calls. I create a PDFGraphics2D object and pass it in to the standard
paint methods in my Java code. Overall, this works fine except for 1 thing:
borders. I have a spreadsheet component created with Java
Thank you, the fix is in the CVS.
- Original Message -
From: "Richard Bair" <[EMAIL PROTECTED]>
To:
Sent: Friday, February 10, 2006 6:52 PM
Subject: [iText-questions] PdfGraphics2D NPE
Hey Bruno & Co
I've encountered an NPE in the PdfGraphics2D drawImag
Hey Bruno & Co
I've encountered an NPE in the PdfGraphics2D drawImage method (line 222 in
my sources, the latest released source -- 1.3). The problem is that the
method requires a BufferedImageOp, whereas the Sun Graphics2D implementation
does not.
I propose:
public void drawImage(Buffer
An example please.
- Original Message -
From: "Guido von der Reith" <[EMAIL PROTECTED]>
To: "Paulo Soares" <[EMAIL PROTECTED]>
Sent: Monday, August 01, 2005 8:52 PM
Subject: Re: [iText-questions] PDFGraphics2D and GradientPaint
> Thanks for your ans
Yes.
- Original Message -
From: "Guido von der Reith" <[EMAIL PROTECTED]>
To:
Sent: Monday, August 01, 2005 10:35 AM
Subject: [iText-questions] PDFGraphics2D and GradientPaint
> Hi,
>
> i have a question:
> does the PDFGraphics2D object of iText support Gra
Hi,
i have a question:
does the PDFGraphics2D object of iText support GradientPaint
to fill a shape with a linear color gradient pattern?
Thanks in advance
Guido von der Reith
--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++
Hi,
There is a problem with using PDFGraphics2D on the Mac , which throws an
exception when setRenderingHint() is called with a certain value; the message
of the exception thrown is:
"null incompatible with Text-specific antialiasing
enable key."
This has been mentioned on this list before, I
me know.
Bill Ensley
Bear Printing
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]On Behalf Of Bill
EnsleySent: Thursday, April 07, 2005 11:36 AMTo: iText
Mail GroupSubject: [iText-questions] PdfGraphics2D Layer
Problem
Hello All!
Interesting
Hello All!
Interesting bug? here, I am using a JTextPane for
styled text and am calling
it's
paint() method and passing a Graphics object to it to paint itself
onto.
This
works well with other Graphics objects, ie Screen, BufferedImage, Print,
etc.
But when
I pass it a PdfGraphics2D
Send me your version and I'll include it.
- Original Message -
From: "Bill Ensley" <[EMAIL PROTECTED]>
To: "iText Mail Group"
Sent: Friday, January 21, 2005 8:41 PM
Subject: [iText-questions] PdfGraphics2D convertImagesToJPEG
> Hello Paulo,
>
>
Hello Paulo,
I just
upgraded my internal version of iText to your newest
version.
Thank you
for adding my convertImagesToJPEG option to PdfGraphicsPrinter.
One other
note on this subject, would it be advisable to add the same
funtionality
to the private setPaint() method when Texture
Hi All,
I'm investigating a bug report from a JFreeChart user who is having
trouble with text alignment in a PDF file created using JFreeChart and
iText. The output is OK on Windows but not quite correct on Linux. I
believe the problem is due to an incorrect result from the
getStringBounds(...)
[Apologies in advance if this post appears twice...the first one seems to
have disappeared.]
Hi All,
I'm investigating a bug report from a JFreeChart user who is having
trouble with text alignment in a PDF file created using JFreeChart and
iText. The output is OK on Windows but not quite correct
setClip() is supported. You can set Document.compressed=false to see the
stream uncompressed.
Best Regards,
Paulo Soares
> -Original Message-
> From: Steven Green [SMTP:[EMAIL PROTECTED]
> Sent: Monday, October 13, 2003 2:51
> To: [EMAIL PROTECTED]
> Subject: [
I implemented an output mechanism using iText in my
application using the PdfGraphics2D writer. The text
does not seem to be clipped as based upon the setClip
parameters. I checked the output to see if it is
requesting clipping, but it appears to be compressed
so I couldn't tell.
Is setClip suppor
Pdf and awt use different graphic coordinates. You'll have to substract y
from the height.
Best Regards,
Paulo Soares
> -Original Message-
> From: Ligius Astratinei [SMTP:[EMAIL PROTECTED]
> Sent: Friday, July 04, 2003 17:20
> To: [EMAIL PROTECTED]
> Subject:
> > You don't need a template. Do it this way:
> >
> > PdfWriter writer = (PdfWriter)gc.getWorkingObject();
> > PdfContentByte cb = writer.getDirectContent();
> > cb.saveState();
> > Graphics2D g2 = cb.createGraphics(width, height, defaultFontMapper);
> >
> > ...do graphics stuff on g2...
> >
> >
> -Original Message-
> From: Ligius Astratinei [SMTP:[EMAIL PROTECTED]
> Sent: Friday, July 04, 2003 15:51
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] PdfGraphics2D and PDFContentByte problem
>
> Hello,
> I'm trying to define an URL act
Hello,
I'm trying to define an URL action for a PDF
document but it doesn't seem to work.
Here are some code excerpts:
PdfWriter writer = (PdfWriter)gc.getWorkingObject();
PdfContentByte cb = writer.getDirectContent();
PdfTemplate tp = cb.createTemplate(pageWidth, pageHeight);
Graphics2D g2
More work for the weekend...
Best Regards,
Paulo Soares
> -Original Message-
> From: Erwin Achermann [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 13:58
> To: iText ML (E-Mail)
> Subject: [iText-questions] PdfGraphics2D: how to get the text width
>
&g
Hi all,
I am using PdfGraphics2D in place of an old PrinterGraphics2D. In my code I have the
following snippet:
width = g2d.getFontMetrics().getStringBounds(txt, flushIndex, flushIndex + flushLen,
g2d).getWidth();
to compute the horizontal extension of some string. This seems to be the culp
You are missing the g2d.dispose().
Best Regards,
Paulo Soares
> -Original Message-
> From: Jeremy Bowman [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 5:02
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] PdfGraphics2D save/restore problem in
>
Thanks Paulo,
for pointing me gently enough to my own error. I fixed it and it works nicely now.
;)
Cheers
Erwin
> -Original Message-
> From: Paulo Soares [mailto:[EMAIL PROTECTED]]
> Subject: RE: [iText-questions] PdfGraphics2D: unbalanced save/Restore
> Exception
>
I commented before that I avoided using saveState() and restoreState() to
implement clipping in my PdfGraphics code because it generated invalid files
more often than not...now I know partially why. The following code uses the
PdfGraphics2D code in iText 0.91 to set a clipping region and draw
l Message-
> From: Erwin Achermann [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 22, 2002 17:05
> To: jim moore; [EMAIL PROTECTED]
> Subject: RE: [iText-questions] PdfGraphics2D: unbalanced save/Restore
> Exception
>
> Hi Jim,
> you're right they were misma
On first glance it looks like your PdfGraphics2D creates and disposes are
mismatched. You create one before the for loop. If there are more pages, you
dispose it and create a new one. This new one never gets disposed though. I
think this code below should fix it:
/**
* createPdf prints a
Last g to be created is not used or disposed.
Best Regards,
Paulo Soares
> -Original Message-
> From: Erwin Achermann [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 22, 2002 15:47
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] PdfGraphics2D: unbalanc
Hi iTexters,
during the last week I was doing exactly a PdfGraphics class as you seem to have done.
I was only implementing the features which we currently are using. Especially I was
cheating with the FontMetrics. Now I realized this morning that you have done a more
complete implementation
I had a slightly off topic idea. We built an iText object type that could
be extended to provide G2D support for a variety of uses. We then added a
JFreeChart wrapper and MonarchChart wrapper. It was pretty hacky, but I
think something like that would work out well. Just my $.02.
===
> -Original Message-
> From: jim moore [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, April 11, 2002 16:00
> To: Paulo Soares; [EMAIL PROTECTED]
> Subject: Re: [iText-questions] PdfGraphics2D class
>
> A couple thoughts on this version (graphics2d-02):
>
>
ts?
--jim
- Original Message -
From: "Paulo Soares" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 8:24 AM
Subject: [iText-questions] PdfGraphics2D class
> This time with support for setClip() without templates.
>
> http://www.geocities.
This time with support for setClip() without templates.
http://www.geocities.com/itextpdf/graphics2d-02.zip
Best Regards,
Paulo Soares
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions
61 matches
Mail list logo