Re: [iText-questions] Version .91 vs. .81 issue

2002-04-24 Thread Bruno Lowagie

Quoting "Prohaska, Jennifer" <[EMAIL PROTECTED]>:

> Does anyone know why going from iText.81 to iText.91 would be causing this?
> I've attached the two documents.

Something very strange is happening indeed.
Is it possible to show us how you are creating the tables?
(just the code for the first 4 column table).

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



Re: [iText-questions] How do I get a copy of pdf.jsp?

2002-04-24 Thread Bruno Lowagie

Quoting Lily Ma <[EMAIL PROTECTED]>:

> My browser always display the page before I can save it to a file.

That's because the JSP is interpreted on ServerSide.
To get the code of pdf.jsp, download the examples.tar.gz
from http://www.lowagie.com/iText/downloads/
or browse the CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/itext/www/examples/

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



[iText-questions] How do I get a copy of pdf.jsp?

2002-04-24 Thread Lily Ma
Title: How do I get a copy of pdf.jsp?





My browser always display the page before I can save it to a file.


Any Help is greatly appreciated.
Lily





RE: [iText-questions] more on font in xml

2002-04-24 Thread Bruno Lowagie

Quoting Thomas McKay <[EMAIL PROTECTED]>:

> 
> FYI -- I don't think this will work
> 
> 
> 
> since 'style' will be picked up early in the method as I mentioned in the
> earlier email.  'style' will always be treated as CSS-style.

I have some old projects that still use style="bold".
Nobody mentioned any problem, but I fixed it anyway
(because there WAS a problem). If style isn't used the
CSS-way, I add the removed attribute to be treated
the 'old' way.

Bruno

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



[iText-questions] Version .91 vs. .81 issue

2002-04-24 Thread Prohaska, Jennifer

Hello - 

I created a PDF document with version .81 and everything worked fine.  I
recently downloaded version .91 and attempted to create the same document.
The document created with .91 now has some major formatting problems (my
java code used to create the document has not changed, only the version of
iText has).  

Does anyone know why going from iText.81 to iText.91 would be causing this?
I've attached the two documents.


 <>  <> 


Thanks for any help.

J. Prohaska   



BOL0.81.pdf
Description: Binary data


BOL0.91.pdf
Description: Binary data


[iText-questions] Multilingual (Chinese/English) fonts

2002-04-24 Thread Jay Teo


Hi,

I am generating PDFs with data coming from the database. And the data 
can be in either English and/or Chinese. For example, some customers' 
name may be in English while others are in Chinese.

Ideally I want to be able to just use one font regardless of the 
language. Now the problem is that all the fonts in Adobe's Asian 
Language Pack have big ugly roman letters!  All the TrueType fonts I 
have seen so far have this problem too.

So my question is does anyboby know of a Unicode TrueType font (with 
Simplified Chinese) with acceptable roman fonts in them?  Nothing fancy, 
I just want the roman letters to look like Helvetica or something.

Thanks.


-j


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



RE: [iText-questions] more on font in xml

2002-04-24 Thread Thomas McKay


FYI -- I don't think this will work



since 'style' will be picked up early in the method as I mentioned in the
earlier email.  'style' will always be treated as CSS-style.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Bruno
Lowagie
Sent: Wednesday, April 24, 2002 1:09 PM
To: Thomas McKay
Cc: [EMAIL PROTECTED]
Subject: RE: [iText-questions] more on font in xml


Quoting Thomas McKay <[EMAIL PROTECTED]>:

> That did work.  Any idea what the problem is?

Yes, it's just another FontFactory-problem.
In the next version, you will be able to use
'Times New Roman' as well as 'Times'.

kind regards,
Bruno

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


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



RE: [iText-questions] more on font in xml

2002-04-24 Thread Bruno Lowagie

Quoting Thomas McKay <[EMAIL PROTECTED]>:

> That did work.  Any idea what the problem is?

Yes, it's just another FontFactory-problem.
In the next version, you will be able to use
'Times New Roman' as well as 'Times'.

kind regards,
Bruno

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



RE: [iText-questions] precision of real numbers in pdf

2002-04-24 Thread Paulo Soares

More digits would mean more precision that is not needed and a bigger file
size. The number of significant digits is discussed in the pdf ref in the
implementation limits.

Best Regards,
Paulo Soares

> -Original Message-
> From: David Teran [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 17:05
> To:   [EMAIL PROTECTED]
> Subject:  [iText-questions] precision of real numbers in pdf
> 
> Hi,
> 
> i noticed an example in PDF 1.4 reference using real numbers with more 
> than two digits after the period. In iText, format double cuts off all 
> except the first two digits after the period for number greater than 1 
> and lower than 32767. Is this the real maximum precision of PDF or just 
> an iText specific thing? Would numbers with four digits after the period 
> be more precise?
> 
> thanks in advance,
> 
> 
> david
> 
> 
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions

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



RE: [iText-questions] Character Set: Displaying Euro symbol

2002-04-24 Thread Paulo Soares

The built-in font Helvetica has the Euro character since Acrobat 4.0 in
windows. I don't know about other platforms or viewers.

Best Regards,
Paulo Soares

> -Original Message-
> From: Yalavarthi, Vasu [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 17:26
> To:   'Paulo Soares'; 'Itext-Questions (E-mail)
> Subject:  RE: [iText-questions] Character Set: Displaying Euro symbol
> 
> I am not embedding any font.
> I am using "Helvetica", "winasi" font with a font size of "8".
> Doesn't this font contain the Euro symbol character?
> 
> Should this font be present on the server-side (where pdf is generated) or
> the client side (where the pdf is viewed in an Acrobat reader/plugin)?
> The reason why i am asking this question is, If i use my machine as the
> server, i could see the euro character from reader on mychine and if i use
> some other machine as server, i couldn't see the euro character. In both
> the
> cases, the client is the reader on my machine.
> 
> Any suggestion to overcome this problem?
> 
> Thanks,
> Vasu
> 
> 
> -Original Message-
> From: Paulo Soares [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 2:25 AM
> To: 'Yalavarthi, Vasu'; 'Itext-Questions (E-mail)
> Subject: RE: [iText-questions] Character Set: Displaying Euro symbol
> 
> 
> If you are not embedding the font then Acrobat uses the available font in
> the system or if this font is not available uses the built-in font. One of
> the fonts used does not contain the Euro character.
> 
> Best Regards,
> Paulo Soares
> 
> > -Original Message-
> > From:   Yalavarthi, Vasu [SMTP:[EMAIL PROTECTED]]
> > Sent:   Tuesday, April 23, 2002 19:22
> > To: 'Itext-Questions (E-mail)
> > Subject:[iText-questions] Character Set: Displaying Euro symbol
> > 
> > Hi,
> >  My servlet generated PDF contains an Euro character symbol (ASCII -
> 0128)
> > and i am displaying the output in an Acrobat plugin.
> > When the servlet is running on my machine, the Euro symbol ( 'EUR' ) is
> > visible, but when the servlet is running on some other machine, the
> > generated PDF contains a "?" symbol for the Euro symbol ( 'EUR' ). 
> > The same servlet generates Excel output and the Euro symbol is visible
> in
> > Excel output irrespective of on which machine the servlet is run.
> > 
> > Is it any configuration issue with regard to Acrobat? Does Acrobat use
> its
> > own character set?
> > 
> > Does anyone know how to fix this issue?
> > 
> > Thanks,
> > Vasu
> > 
> > 
> > 
> > ___
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/itext-questions

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



RE: [iText-questions] Character Set: Displaying Euro symbol

2002-04-24 Thread Yalavarthi, Vasu

I am not embedding any font.
I am using "Helvetica", "winasi" font with a font size of "8".
Doesn't this font contain the Euro symbol character?

Should this font be present on the server-side (where pdf is generated) or
the client side (where the pdf is viewed in an Acrobat reader/plugin)?
The reason why i am asking this question is, If i use my machine as the
server, i could see the euro character from reader on mychine and if i use
some other machine as server, i couldn't see the euro character. In both the
cases, the client is the reader on my machine.

Any suggestion to overcome this problem?

Thanks,
Vasu


-Original Message-
From: Paulo Soares [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 2:25 AM
To: 'Yalavarthi, Vasu'; 'Itext-Questions (E-mail)
Subject: RE: [iText-questions] Character Set: Displaying Euro symbol


If you are not embedding the font then Acrobat uses the available font in
the system or if this font is not available uses the built-in font. One of
the fonts used does not contain the Euro character.

Best Regards,
Paulo Soares

> -Original Message-
> From: Yalavarthi, Vasu [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 19:22
> To:   'Itext-Questions (E-mail)
> Subject:  [iText-questions] Character Set: Displaying Euro symbol
> 
> Hi,
>  My servlet generated PDF contains an Euro character symbol (ASCII - 0128)
> and i am displaying the output in an Acrobat plugin.
> When the servlet is running on my machine, the Euro symbol ( 'EUR' ) is
> visible, but when the servlet is running on some other machine, the
> generated PDF contains a "?" symbol for the Euro symbol ( 'EUR' ). 
> The same servlet generates Excel output and the Euro symbol is visible in
> Excel output irrespective of on which machine the servlet is run.
> 
> Is it any configuration issue with regard to Acrobat? Does Acrobat use its
> own character set?
> 
> Does anyone know how to fix this issue?
> 
> Thanks,
> Vasu
> 
> 
> 
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions

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



[iText-questions] precision of real numbers in pdf

2002-04-24 Thread David Teran

Hi,

i noticed an example in PDF 1.4 reference using real numbers with more 
than two digits after the period. In iText, format double cuts off all 
except the first two digits after the period for number greater than 1 
and lower than 32767. Is this the real maximum precision of PDF or just 
an iText specific thing? Would numbers with four digits after the period 
be more precise?

thanks in advance,


david


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



RE: [iText-questions] more on font in xml

2002-04-24 Thread Thomas McKay

That did work.  Any idea what the problem is?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Bruno
Lowagie
Sent: Wednesday, April 24, 2002 11:04 AM
To: Thomas McKay
Cc: iText
Subject: Re: [iText-questions] more on font in xml


Quoting Thomas McKay <[EMAIL PROTECTED]>:

What if you just try 'Times' instead of 'Times New Roman'?

>  style="font-family:Times; font-size:12.0; font-style:italic"
> >
> blah blah blah
> 

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

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



Re: [iText-questions] more on font in xml

2002-04-24 Thread Bruno Lowagie

Quoting Thomas McKay <[EMAIL PROTECTED]>:

What if you just try 'Times' instead of 'Times New Roman'?

>  style="font-family:Times; font-size:12.0; font-style:italic"
> >
> blah blah blah
> 

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



[iText-questions] more on font in xml

2002-04-24 Thread Thomas McKay


The comment for MarkupParser.parseAttributes() says that the string passed
in should be of the form:

'key1="value1"; key2="value2";... keyN="valueN" '

However, the nested string tokenizers parse first on ';' then on ':'.  The
latter should be '=', no?

This is called from FontFactory.getFont().  In that method an attribute of
MarkupTags.STYLE is checked for which in turn leads to checking for
MarkupTags.CSS_* attributes.  However, MarkupTags.STYLE is check for again
later in the method as well.  Perhaps the first tag should be
MarkupTags.CSS_?

One other question, there is a MarkupParser.parseFont().  Should that method
be called instead of MarkupParser.parseAttributes()?

So, back to my original question:  How do I properly specify a font of Times
New Roman, size of 12, italic?


blah blah blah


Although the Times New Roman phrase does not work, the size and style do.



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



RE: [iText-questions] font markup attributes question

2002-04-24 Thread Bruno Lowagie

Quoting Thomas McKay <[EMAIL PROTECTED]>:

> Thanks, I'll try them out.
> 
> However, how do I specify the font in XML?


Take a look at this example:
http://www.lowagie.com/iText/examples/cv.xml

If you convert it with iText0.91, it doesn't look
very well anymore. I used this example to test the
bugfixes that will be in the next release.

Remark: it should also be possible to use CSS-like syntax:

But I didn't test this yet.

kind regards,
Bruno

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



RE: [iText-questions] font markup attributes question

2002-04-24 Thread Thomas McKay

Thanks, I'll try them out.

However, how do I specify the font in XML?


blah blah blah


-Original Message-
From: Bruno Lowagie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 9:21 AM
To: Thomas McKay
Cc: iText
Subject: Re: [iText-questions] font markup attributes question


Quoting Thomas McKay <[EMAIL PROTECTED]>:

> 
> Could someone enlighten me (or point me to the docs) for how to specify a
> font in XML?  Specifically, font=New Times Roman, size=12.0, and
> style=italic.  It's not clear to me from the source how to specify this.

There were several bugs introduced in the XML part after
introducing the FontFactory-class. I have fixed most of them
and you can find the new source code in the CVS repository.

I also uploaded Paulo's fix for the PdfGraphics2D class.

kind regards,
Bruno


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



Re: [iText-questions] font markup attributes question

2002-04-24 Thread Bruno Lowagie

Quoting Thomas McKay <[EMAIL PROTECTED]>:

> 
> Could someone enlighten me (or point me to the docs) for how to specify a
> font in XML?  Specifically, font=New Times Roman, size=12.0, and
> style=italic.  It's not clear to me from the source how to specify this.

There were several bugs introduced in the XML part after
introducing the FontFactory-class. I have fixed most of them
and you can find the new source code in the CVS repository.

I also uploaded Paulo's fix for the PdfGraphics2D class.

kind regards,
Bruno

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



[iText-questions] image problems

2002-04-24 Thread Chad Brandt

I am creating pdf files that have images through out the file and I am 
encountering the following problems:

When the image is aligned in the center and it is the last thing on the 
document and the image is to large to fit on the existing page. Itext does 
not create a new page with the image, instead it just cuts the image out of 
the resulting pdf document. Is this a known bug? Is there any work around 
for this?

The next issue I have encountered is when I want the image on the left and 
text to wrap around it. The text wrapping only appears to work when the 
image is on the right. Is this a limitation of the existing application? 
Also when I have the image on the right and the text on the left it does 
not really wrap, instead when the image ends the text still only goes up to 
where the image was and not the full length of the page.

Any work around or suggestions would be helpful

Thanks,
Chad Brandt


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



[iText-questions] from servlet forward to dynamic pdf

2002-04-24 Thread Dietmar . Mueller

My, some can help me.

I use Neteans 3.3.1 with integrated Tomcat 3.2.

I'll use two servlets in this case. The first servlet to manage the request and
forward then to a second servlet.

In the case that the seconde servlet produce text/html it works fine, but if
i forward to a servlet that generate application/pdf no result is produced.
The second servlet work fine, wenn ich call direct.

The source:

import javax.servlet.*;
import javax.servlet.http.*;

public class test_forward extends HttpServlet {


protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {

RequestDispatcher dispatcher =
getServletConfig().getServletContext().getRequestDispatcher("/test_pdf");
dispatcher.forward(request, response);

}
}


import java.io.ByteArrayOutputStream;
import com.lowagie.text.*;
import com.lowagie.text.pdf.PdfWriter;
import javax.servlet.*;
import javax.servlet.http.*;

public class test_pdf extends HttpServlet {

protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {


response.setContentType("application/pdf");
ByteArrayOutputStream baos = new ByteArrayOutputStream();

try
{

Document document = new Document(PageSize.A4);
PdfWriter.getInstance(document,baos);

document.open();
document.add(new Paragraph("TEST"));
document.close();

}catch (Exception e){System.out.println(e.toString());}


response.setContentLength( baos.size());
baos.writeTo( response.getOutputStream() );

}
}


My, some have an idea or sea my mistake.

regard Dietmar Müller




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



RE: [iText-questions] Error with derived Fonts

2002-04-24 Thread Paulo Soares

This is a transformation order problem. The solution is to change in
PdfGraphics2D:

public void drawString(String s, float x, float y) {
AffineTransform at = getTransform();
AffineTransform at2 = getTransform();
at2.translate(x, y);
at2.concatenate(font.getTransform());
setTransform(at2);
AffineTransform inverse = this.normalizeMatrix();
AffineTransform flipper = AffineTransform.getScaleInstance(1,-1);
inverse.concatenate(flipper);
double[] mx = new double[6];
inverse.getMatrix(mx);
cb.beginText();
cb.setFontAndSize(baseFont, fontSize);
cb.setTextMatrix((float)mx[0], (float)mx[1], (float)mx[2],
(float)mx[3], (float)mx[4], (float)mx[5]);
cb.showText(s);
cb.endText();
setTransform(at);
}

Best Regards,
Paulo Soares 

> -Original Message-
> From: Erwin Achermann [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 10:10
> To:   iText ML (E-Mail)
> Subject:  [iText-questions] Error with derived Fonts
> 
> Hi Paulo and other iText-ers,
> 
> derived Fonts carry along an AffineTransform (e.g. for fancy things like
> backwards leaning font) 
> I fixed this almost by subclassing PdfGraphics2D. But there remains a
> discrepancy between java.awt.Graphics2D and my
> com.lowagie.text.pdf.PdfGraphics in placing Strings, which I really do not
> understand. 
> 
> In the following two examples, uncommenting the global transform yield the
> same picture on PDF as well as on screen, but with the global transform
> the two pictures differ (obviously by the shearing amount is interpreted
> differently)... but I don't see where this should/does/does not happen. 
> 
> Thanks for your comments
> Cheers
> Erwin
> 
> - derived font on screen
> /*
>  * How does java.awt.Graphics2D deal with derived fonts, and where
>  * dose it place it? 
>  */
> 
> import java.io.FileOutputStream;
> import java.io.IOException;
> import java.awt.geom.AffineTransform;
> import java.awt.*;
> 
> 
> import com.lowagie.text.*;
> import com.lowagie.text.pdf.PdfWriter;
> import com.lowagie.text.pdf.PdfContentByte;
> 
> import java.awt.*;
> import javax.swing.*;
> import java.awt.event.*;
> 
> 
> public class DerivedScreen extends JFrame  {
> 
>   public DerivedScreen() 
>   {
>   super("DerivedScreen");
>   setSize(500,500); // SIZE of the Graphics
> 
>   MyPane mine = new MyPane();
>   getContentPane().add(mine);
>   // ExitWindow exit = new ExitWindow();
>   // addWindowListener(exit);
> 
>   setDefaultCloseOperation(EXIT_ON_CLOSE);
>   }
>   
> 
> public static void main(String[] args) {
> 
>   DerivedScreen screen = new DerivedScreen();
>   screen.show();
>   }
> }
> 
> class MyPane extends JPanel 
> {
>   public void paintComponent(Graphics g) {
>   Graphics2D g2d = (Graphics2D)g;
>   
>   java.awt.Font myFont = new java.awt.Font("Arial",
> java.awt.Font.PLAIN, 12);
>   
>   
>   g2d.setFont(myFont);
>   g2d.drawString("This is arial plain",10,15);
> 
>   AffineTransform trafo =
> AffineTransform.getShearInstance(0.5f,0f);
>   myFont = myFont.deriveFont(trafo);
>   
>   g2d.transform(trafo);/// leaving a global
>   
> /// transform away,
>   
> /// yields the same
>   
> /// picture on pdf and on
>   
> /// screen
> 
>   g2d.setFont(myFont);
>   g2d.drawString("This is sheared arial plain",10,30);
>   g2d.drawLine(0,0,20,20);
>   
>   }
> }
> 
> // class ExitWindow extends WindowAdapter 
> // {
> //public void windowClosing(WindowEvent e) 
> //{
> //System.out.println(" terminating ");
> //System.exit(0);
> //}
> // }
> 
> - derived font in pdf
> /*
>  * How does com.lowagie.text.pdf.PdfGraphics deal with derived fonts, and
> where
>  * dose it place it? 
>  *
>  */
> 
> import java.io.FileOutputStream;
> import java.io.IOException;
> import java.awt.geom.AffineTransform;
> import java.awt.*;
> 
> 
> import com.lowagie.text.*;
> import com.lowagie.text.pdf.PdfWriter;
> import com.lowagie.text.pdf.PdfContentByte;
> 
> 
> 
> class DerivedPdf  {
> 
> public static void main(String[] args) {
> 
> System.out.println("Example: derived fonts");
> 
> // step 1: creation of a document-object
> Document document = new Document();
> Document.compress = false;
> 
>   java.awt.Font myFont = new java.awt.Font("Arial",
> java.awt.Font.PLAIN, 12);
>   
> 
> try {
> // step 2:
> // we create a writer that listens t

[iText-questions] Chunk.setBackground()

2002-04-24 Thread Campanale, Rocco

I'm using version, 0.91. In the tutorial mention is made of the method setBackground 
in the object Chunk. However, I can't find the code for it anywhere. Is it no longer 
supported or does another way to change the background of a Chunk exist. Thanks.

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



RE: [iText-questions] Styles (Bold/Italic) to Embedded fonts

2002-04-24 Thread Paulo Soares

It's not supported by PDF. The modifiers are not really applied by the
viewer but rather by the system. Once the font is embedded it's used as-is
by the viewer without using the modifiers.

Best Regards,
Paulo Soares

> -Original Message-
> From: B J [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, April 24, 2002 11:52
> To:   [EMAIL PROTECTED]
> Subject:  [iText-questions] Styles (Bold/Italic) to Embedded fonts
> 
> Hi,
> 
> I could successfully create a pdf document with embedded font using iText.
> Is it possible to embed a single TTF and still have bold/italic styles
> displayed for a font in the pdf document? As per the iText documentation
> it is not allowed, I just wanted to know if this is not supported by PDF
> or not yet provided by iText.
> 
> Thank you
> 
> B J 
> 
> 
> 
>   _  
> 
> Do You Yahoo!?
> Yahoo! Games  - play
> chess, backgammon, pool and more

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



[iText-questions] Styles (Bold/Italic) to Embedded fonts

2002-04-24 Thread B J
Hi,
I could successfully create a pdf document with embedded font using iText. Is it possible to embed a single TTF and still have bold/italic styles displayed for a font in the pdf document? As per the iText documentation it is not allowed, I just wanted to know if this is not supported by PDF or not yet provided by iText.Thank youB J Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more

RE: [iText-questions] PdfGraphics2D save/restore problem in Acrobat 4

2002-04-24 Thread Paulo Soares

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
> Acrobat 4
> 
> 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 a
> circle 
> in a template at the bottom of the page; the result displays fine in
> Acrobat 
> Reader 5 and GSview on Windows, and in xpdf and kghostview on Linux, but 
> produces "There was an error processing a page. Invalid restore." in
> Acrobat 
> Reader 4 on both platforms.  If the PdfGraphics2D is created directly from
> 
> the base PdfContentByte instead of a template, it works fine even in
> Acrobat 
> 4.
> 
> Could somebody more enlightened than I about the save/restore
> functionality 
> see if there's a way to avoid this problem?  Or if it's an inherent bug in
> 
> Acrobat 4, at least document this in the FAQ?
> 
> Jeremy
> 
> 
> 
> import com.lowagie.text.*;
> import com.lowagie.text.pdf.*;
> import java.awt.Graphics2D;
> import java.io.FileOutputStream;
> 
> public class ClipTest {
> 
> public static void main(String[] args) {
> try {
> Document doc = new Document(PageSize.A4, 18, 18, 18, 18);
> FileOutputStream os = new FileOutputStream("cliptest.pdf");
> PdfWriter writer = PdfWriter.getInstance(doc, os);
> doc.open();
> PdfContentByte cb = writer.getDirectContent();
> PdfTemplate template = cb.createTemplate(300, 300);
> Graphics2D g2d = template.createGraphics(300, 300);
> g2d.setClip(50, 50, 200, 200);
> g2d.fillOval(30, 30, 220, 220);
> cb.addTemplate(template, 0, 0);
> doc.close();
> }
> catch (Exception e) {
> System.err.println(e.getMessage());
> e.printStackTrace(System.err);
> }
> }
> }
> 
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions

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



RE: [iText-questions] Character Set: Displaying Euro symbol

2002-04-24 Thread Paulo Soares

If you are not embedding the font then Acrobat uses the available font in
the system or if this font is not available uses the built-in font. One of
the fonts used does not contain the Euro character.

Best Regards,
Paulo Soares

> -Original Message-
> From: Yalavarthi, Vasu [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 19:22
> To:   'Itext-Questions (E-mail)
> Subject:  [iText-questions] Character Set: Displaying Euro symbol
> 
> Hi,
>  My servlet generated PDF contains an Euro character symbol (ASCII - 0128)
> and i am displaying the output in an Acrobat plugin.
> When the servlet is running on my machine, the Euro symbol ( 'EUR' ) is
> visible, but when the servlet is running on some other machine, the
> generated PDF contains a "?" symbol for the Euro symbol ( 'EUR' ). 
> The same servlet generates Excel output and the Euro symbol is visible in
> Excel output irrespective of on which machine the servlet is run.
> 
> Is it any configuration issue with regard to Acrobat? Does Acrobat use its
> own character set?
> 
> Does anyone know how to fix this issue?
> 
> Thanks,
> Vasu
> 
> 
> 
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions

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



[iText-questions] Error with derived Fonts

2002-04-24 Thread Erwin Achermann

Hi Paulo and other iText-ers,

derived Fonts carry along an AffineTransform (e.g. for fancy things like backwards 
leaning font) 
I fixed this almost by subclassing PdfGraphics2D. But there remains a discrepancy 
between java.awt.Graphics2D and my com.lowagie.text.pdf.PdfGraphics in placing 
Strings, which I really do not understand. 

In the following two examples, uncommenting the global transform yield the same 
picture on PDF as well as on screen, but with the global transform the two pictures 
differ (obviously by the shearing amount is interpreted differently)... but I don't 
see where this should/does/does not happen. 

Thanks for your comments
Cheers
Erwin

- derived font on screen
/*
 * How does java.awt.Graphics2D deal with derived fonts, and where
 * dose it place it? 
 */

import java.io.FileOutputStream;
import java.io.IOException;
import java.awt.geom.AffineTransform;
import java.awt.*;


import com.lowagie.text.*;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.pdf.PdfContentByte;

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;


public class DerivedScreen extends JFrame  {

public DerivedScreen() 
{
super("DerivedScreen");
setSize(500,500); // SIZE of the Graphics

MyPane mine = new MyPane();
getContentPane().add(mine);
// ExitWindow exit = new ExitWindow();
// addWindowListener(exit);

setDefaultCloseOperation(EXIT_ON_CLOSE);
}


public static void main(String[] args) {

DerivedScreen screen = new DerivedScreen();
screen.show();
}
}

class MyPane extends JPanel 
{
public void paintComponent(Graphics g) {
Graphics2D g2d = (Graphics2D)g;

java.awt.Font myFont = new java.awt.Font("Arial", java.awt.Font.PLAIN, 
12);


g2d.setFont(myFont);
g2d.drawString("This is arial plain",10,15);

AffineTransform trafo = AffineTransform.getShearInstance(0.5f,0f);
myFont = myFont.deriveFont(trafo);

g2d.transform(trafo);/// leaving a global
 /// 
transform away,
 /// 
yields the same
 /// 
picture on pdf and on
 /// screen

g2d.setFont(myFont);
g2d.drawString("This is sheared arial plain",10,30);
g2d.drawLine(0,0,20,20);

}
}

// class ExitWindow extends WindowAdapter 
// {
//  public void windowClosing(WindowEvent e) 
//  {
//  System.out.println(" terminating ");
//  System.exit(0);
//  }
// }

- derived font in pdf
/*
 * How does com.lowagie.text.pdf.PdfGraphics deal with derived fonts, and where
 * dose it place it? 
 *
 */

import java.io.FileOutputStream;
import java.io.IOException;
import java.awt.geom.AffineTransform;
import java.awt.*;


import com.lowagie.text.*;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.pdf.PdfContentByte;



class DerivedPdf  {

public static void main(String[] args) {

System.out.println("Example: derived fonts");

// step 1: creation of a document-object
Document document = new Document();
Document.compress = false;

java.awt.Font myFont = new java.awt.Font("Arial", java.awt.Font.PLAIN, 
12);


try {
// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a file

PdfWriter writer = PdfWriter.getInstance(document, new 
FileOutputStream("d:/temp/fontderive.pdf"));

// step 3: we open the document
document.open();

PdfContentByte cb = writer.getDirectContent();
Graphics2D g2 = cb.createMyGraphics(500, 500); // SIZE of
   
// the
   
// Graphics 

g2.setFont(myFont);
g2.drawString("This is arial plain",10,15);

AffineTransform trafo = 
AffineTransform.getShearInstance(0.5f,0f);
myFont = myFont.deriveFont(trafo);

g2.transfo

Re: [iText-questions] font markup attributes question

2002-04-24 Thread Bruno Lowagie

Quoting Thomas McKay <[EMAIL PROTECTED]>:

> 
> Could someone enlighten me (or point me to the docs) for how to specify a
> font in XML?  Specifically, font=New Times Roman, size=12.0, and
> style=italic.  It's not clear to me from the source how to specify this.

I noticed there is a bug in this part.
I just checked the examples and I have seen that
some attributes are not taken into account.
I have a meeting now, but I will try to fix this
in the afternoon.

kind regards,
Bruno

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