RE: [iText-questions] Line widths in graphics

2002-07-24 Thread Paul Warren

On Wed, 2002-07-24 at 10:55, Paulo Soares wrote:
> Try the "smooth line art" option if you are using Acrobat.

Ah - I was using Acrobat 4 on Linux.  I've just tried this option on
Acrobat 5.  It helps a little, but the lines are still uneven.

I'm still a little confused as to why this is only a problem with the
lines in my graphics, and not with the lines that delimit the tables.

thanks,

Paul

> > -Original Message-
> > From:   Paul Warren [SMTP:[EMAIL PROTECTED]]
> > Sent:   Wednesday, July 24, 2002 10:12 AM
> > To: [EMAIL PROTECTED]
> > Subject:[iText-questions] Line widths in graphics
> > 
> > I am having a bit of a problem width line widths in graphics.  I am
> > using the Graphics2D interface to draw tree diagrams onto a template,
> > which is then included in the PDF document.  The diagrams consist of
> > many lines all of the same width, but when viewed in Acrobat viewer the
> > width of the lines is uneven, and varies with zoom level.  I assume that
> > this is due to the viewer trying to display lines on the lower
> > resolution of the screen, but I'm wondering if there is any way to
> > improve this?
> > 
> > The document also contains tables.  The borders on these tables stay an
> > even width at all zoom levels - is there some trick I'm missing here?
> > 
> > Paul
> > 
> > 
> > 
> > 
> > 
> > ---
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > ___
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 
> ---
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
-- 
Paul Warren, Client Services   DecisionSoft Limited
+44-1865-203192http://www.decisionsoft.com



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] Line widths in graphics

2002-07-24 Thread Paul Warren

I am having a bit of a problem width line widths in graphics.  I am
using the Graphics2D interface to draw tree diagrams onto a template,
which is then included in the PDF document.  The diagrams consist of
many lines all of the same width, but when viewed in Acrobat viewer the
width of the lines is uneven, and varies with zoom level.  I assume that
this is due to the viewer trying to display lines on the lower
resolution of the screen, but I'm wondering if there is any way to
improve this?

The document also contains tables.  The borders on these tables stay an
even width at all zoom levels - is there some trick I'm missing here?

Paul





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] Creating new pages / page numbers

2002-05-29 Thread Paul Warren

I am current creating PDF documents using absolute positioning of text
and graphics, as described in chapter 10.

I'm a little confused about how to start a new page, and how to get the
current page number.  At the moment I am calling:

  document.newPage();

which works, but only if something was actually written to the previous
page.  This is not a great problem, but is there anyway to force a new
page?  

Is there a way to get the current page number?  document.getPageNumber()
always returns 0.

I suspect that I'm misunderstanding what this function is supposed to
do...

Paul

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] Implementing image maps

2002-05-14 Thread Paul Warren

On Tue, May 14, 2002 at 04:38:29PM +0100, Paulo Soares wrote:
> Link coordinates are always relative to the page and that's the way PDF
> works. It's impossible for the moment to make it relative to the template as
> it would require to store the transformation matrix, something that is not
> done now. You'll have to place the images at absolute positions and work
> from there.

OK.  The difficulty I see in doing this is in mixing the graphics and
text (and in particular, tables).  From reading the tutorial, it looks
like I not use the Document class, and instead should do the text layout
using columns, as this allows me call get/setYLine and thus stop and
start text around the graphics.

My next question is then how to handle tables.  Given that I'll be using
absolute position, it sounds like I need to use PdfPTables.  What
concerns me is how to split PdfPTables across multiple pages where
necessary.  Presumably, I need to look at each row and call
"getRowHeight" to determine what will fit on a page, and then call
writeSelectedRows appropriately.

Would it be worth me attempting to develop a patch to allow relative
link co-ordinates?

cheers,

Paul

___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] Implementing image maps

2002-05-14 Thread Paul Warren

Hi,

I am trying to implement image maps in a PDF document, so that areas of
a graphic link to other points in a PDF document.

I am creating the graphics using Graphics2D to create a PDFTemplate (as
per tutorial chapter10).  I want to include the graphics inline, so I
then do:

  document.add(new ImgTemplate(myPDFTemplate));

This much works very well.  

My problem is in creating the link areas.  I can use
PDFTemplate.localGoto("name", llx, lly, urx, ury), but these
co-ordinates are relative to the page, not the template.  What I really
want to do is use co-ordinates relative to the lower left of the
template.

Is there a way around this?  I can't see how to transform the
co-ordinates myself, as I don't know the absolute position where the
ImgTemplate will be placed.

cheers,

Paul

___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] Unicode fonts via PDFGraphics2D

2002-05-13 Thread Paul Warren

On Mon, May 13, 2002 at 05:34:44PM +0100, Paulo Soares wrote:
> The Lucida fonts shipped by sun have the character. The font match is done
> comparing with java.awt.Font.getFontName(). To match the bold you'd have
> "sansserif.bold".

I see - that explains it.

Thanks for the help,

Paul

___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] Unicode fonts via PDFGraphics2D

2002-05-13 Thread Paul Warren

On Mon, May 13, 2002 at 03:08:32PM +0100, Paulo Soares wrote:
> > What I can't do is actually select and use this font via the Graphics 2D
> > interface.  I found part of a thread in the mailing list archives (which
> > is where I got the above code) but I couldn't find the beginning of the
> > thread.
> > 
>   The purpose of the FonfMapper is to map a PDF font to a awt font.
> This implies that there is a awt font to start with. You'll have to find out
> how are the fonts registered in Unix. In Windows, all the system fonts are
> automatically registered and I suspect that it's the same in Unix with the X
> fonts.  

OK.  What I was trying to do is make the logical font name "SanSerif"
resolve to be this particular TTF font, without registering that font
with the X server.  I am intending to run this under jdk 1.4, running
with the "headless" option - I have yet to investigate how fonts are
registered in this case.

> If you can't register the font you may replace any awt font with:
> 
>   mapper.putName("sansserif", pp);

That works - many thanks.

I had tried this previously, but with:

mapper.putName("SanSerif", pp);

Like this, it does not work, with "sansserif" it does.  Both ways, I
create the font in AWT using:

  new Font("SanSerif", Font.PLAIN, 18);

> > A non-itext related problem that I have is that we will not be able to
> > distribute the MS Arial Unicode font as part of our application.  Can
> > anyone suggest an alternative source for a font containing the infinity
> > symbol?
> > 
>   All the standard Windows fonts have that symbol.

Unfortunately, the EULA prevents us from redistributing these fonts with
our application.  I have just realised that the Lucida font distributed
with Java is a TTF font, and contains a good range of characters, so
that may be suitable.

thanks for your help,

Paul

___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



[iText-questions] Unicode fonts via PDFGraphics2D

2002-05-13 Thread Paul Warren

I am trying to generate graphics for inclusion in PDFs which contain
the infinity symbol (unicode 0x221E).

I can get this to work in a normal paragraph:

  BaseFont myFont = BaseFont.createFont(
"/home/shared/drop/fonts/arialuni.ttf",
BaseFont.IDENTITY_H, 
BaseFont.EMBEDDED);

  document.add(
new Paragraph(
  "Infinity: \u221e", 
  new com.lowagie.text.Font(myFont, 12, com.lowagie.text.Font.NORMAL)));

but I can't get this to work via the Graphics 2D interface.  From
looking at other mails on this list I understand that I need to tweak
the font mapper:

  DefaultFontMapper mapper = new DefaultFontMapper();
  mapper.insertDirectory("/home/shared/drop/fonts");
  DefaultFontMapper.BaseFontParameters pp = 
mapper.getBaseFontParameters("Arial Unicode MS");
  if (pp != null) {
pp.encoding = BaseFont.IDENTITY_H;
  }

What I can't do is actually select and use this font via the Graphics 2D
interface.  I found part of a thread in the mailing list archives (which
is where I got the above code) but I couldn't find the beginning of the
thread.

A non-itext related problem that I have is that we will not be able to
distribute the MS Arial Unicode font as part of our application.  Can
anyone suggest an alternative source for a font containing the infinity
symbol?

cheers,

Paul

___

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions