[iText-questions] Increase document resolution

2002-06-14 Thread Vadell Cifre, Enrique

Hi, i'm trying to use iText to draw a chart, using graphics primitives.

When using graphics primitives as:

Graphic grx = new Graphic();
grx.rectangle(100, 700, 100, 100);

the coordinates are expresed as points and documentation says there are 72
points per inch (this is at 72 dpi). But i need more resolution (300 points
per inch would be perfect). Is there any way to do this?.

Thanks.

___

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

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



Re: [iText-questions] Increase document resolution

2002-06-14 Thread Nicolas Ivering

If you have an Graphics2D instance you can use the scale-method. 
grx.scale(300.0/72, 300.0/72) would give you 300 dpi (presuming it was 
72 before the scale).

Vadell Cifre, Enrique wrote:

Hi, i'm trying to use iText to draw a chart, using graphics primitives.

When using graphics primitives as:

Graphic grx = new Graphic();
grx.rectangle(100, 700, 100, 100);

the coordinates are expresed as points and documentation says there are 72
points per inch (this is at 72 dpi). But i need more resolution (300 points
per inch would be perfect). Is there any way to do this?.

Thanks.

___

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

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



-- 
Nicolas Serrador Ivering
Greenmill Consulting AB
Byängsgränd 20
SE-120 40 Årsta
Sweden

Office: +46 (0)8 664 7 664
Fax:+46 (0)8 664 7 864
Mobile: +46 (0)709 734237
Email: [EMAIL PROTECTED]



___

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

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



[iText-questions] [Itext Problem] : Images not displayed correct

2002-06-14 Thread martin . hald

[Itext Problem] : Images not displayed correct
Hello together,

hope somebody can help me. I'm using Itext version 0.92.
now i've got the following problem when i'd like to create PDF from an HTML
file.
I'd like to write two images side by side.

 I'd tried the following html code:

test 1
table border=1 width=450
tr
tdimg src=neu.jpg width=200 height=200/img/td
tdimg src=neu.jpg width=200 height=200/img/td
/tr
/table

test2
p
spanimg src=neu.jpg width=200 height=200/img/span
spanimg src=neu1.jpg width=200 height=200/img/span
/p

test3
table border=1 width=400
colgroup
col width=200/col
col width=200/col
/colgroup
tr
tdimg src=neu.jpg width=200 height=200/img/td
tdimg src=neu.jpg width=200 height=200/img/td
/tr
/table
/body
/html

but that doesn't really work. I get an Output like this :
(Embedded image moved to file: pic32444.pcx)
Can somebody tell me how i got this 2 images side by side and in the right size ?

Thanks


pic32444.pcx
Description: Binary data


[iText-questions] DefaultFontMapper.insertDirectory is (too) slow

2002-06-14 Thread Erwin Achermann

Hi Bruno,

we are facing the problem, that inserDirectory processes 250 font files, consuming 
more time than acceptable (8 seconds). I was browsing to code and observed that for 
each font file a basefont is created. This includes loading mapping tables (which is 
what we need in the first place) but this also include construction of kerning tables, 
and numerous other datastructure: 

TrueTypeFont.process() 
...
fontName = getBaseFont();
fullName = getNames(4); //full name
familyName = getNames(1); //family name
fillTables();
readGlyphWidths();
readCMaps();
readKerning();
...

I would propose that these font information are only loaded when the font is actually 
needed in the document, and thus speeding up the insertDirectory-call. A lazy Font 
construction, if you wish. Is this problem recognized, planned to be solved or am I 
completely mistaken here? 

Cheers
Erwin


___

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

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



Re: [iText-questions] DefaultFontMapper.insertDirectory is (too) slow

2002-06-14 Thread Bruno

Quoting Erwin Achermann [EMAIL PROTECTED]:

 Hi Bruno,
 
 we are facing the problem, that inserDirectory processes 250 font files, =
 consuming more time than acceptable (8 seconds). I was browsing to code =
 and observed that for each font file a basefont is created. This =
 includes loading mapping tables (which is what we need in the first =
 place) but this also include construction of kerning tables, and =
 numerous other datastructure:=20
 
   TrueTypeFont.process()=20
   ...
   fontName =3D getBaseFont();
   fullName =3D getNames(4); //full name
   familyName =3D getNames(1); //family name
   fillTables();
   readGlyphWidths();
   readCMaps();
   readKerning();
   ...
 
 I would propose that these font information are only loaded when the =
 font is actually needed in the document, and thus speeding up the =
 insertDirectory-call. A lazy Font construction, if you wish. Is this =
 problem recognized, planned to be solved or am I completely mistaken =
 here?=20

Paulo wrote the insertDirectory-functionality, so I guess
he will answer your mail too. As for me, I have received
a nice copy of the Reference Manual as a donation and in
return, I will reserve some time in the months August and
September to do a 'clean-up' of the code. I will not
necessarily add new functionality, just add lots of comments
and references to the Reference Manual, fix some reported
problems and combine all the code that was sent to me and
try to make it more 'readable', 'debugable',...

Bruno

___

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

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



RE: [iText-questions] DefaultFontMapper.insertDirectory is (too) slow

2002-06-14 Thread Paulo Soares

There's no problem here. First of all the class DefaultFontMapper is a
generic class that may not be suitable for all the cases. You can sub-class
it or create a new one if special capabilities are needed.
You only have to create an instance of it once and then use it everywhere in
other threads; I don't think the load time is that important in this case.
Lazy evaluation would require scanning the directory and reading all the
files to find the font, saving no time in the process.

Best Regards,
Paulo Soares

 -Original Message-
 From: Erwin Achermann [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, June 14, 2002 10:08
 To:   iText ML (E-Mail)
 Subject:  [iText-questions] DefaultFontMapper.insertDirectory is (too)
 slow
 
 Hi Bruno,
 
 we are facing the problem, that inserDirectory processes 250 font files,
 consuming more time than acceptable (8 seconds). I was browsing to code
 and observed that for each font file a basefont is created. This includes
 loading mapping tables (which is what we need in the first place) but this
 also include construction of kerning tables, and numerous other
 datastructure: 
 
   TrueTypeFont.process() 
   ...
   fontName = getBaseFont();
   fullName = getNames(4); //full name
   familyName = getNames(1); //family name
   fillTables();
   readGlyphWidths();
   readCMaps();
   readKerning();
   ...
 
 I would propose that these font information are only loaded when the font
 is actually needed in the document, and thus speeding up the
 insertDirectory-call. A lazy Font construction, if you wish. Is this
 problem recognized, planned to be solved or am I completely mistaken here?
 
 
 Cheers
 Erwin
 
 
 ___
 
 Don't miss the 2002 Sprint PCS Application Developer's Conference
 August 25-28 in Las Vegas -
 http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
 
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/itext-questions

___

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

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



RE: [iText-questions] Increase document resolution

2002-06-14 Thread Paulo Soares

Don't use Graphic. It's only there for compatibility with some very old code
and should have been deprecated long ago. Use PdfContentByte to write your
graphics. If you need more resolution use fractions. At least two decimal
places will be output to the document giving you a resolution of 7200 dpi.
If you are using charts have you consider JFreeChart? They even have a
tutorial on how to generate charts with iText.

Best Regards,
Paulo Soares

 -Original Message-
 From: Vadell Cifre, Enrique [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, June 14, 2002 8:37
 To:   '[EMAIL PROTECTED]'
 Subject:  [iText-questions] Increase document resolution
 
 Hi, i'm trying to use iText to draw a chart, using graphics primitives.
 
 When using graphics primitives as:
 
 Graphic grx = new Graphic();
 grx.rectangle(100, 700, 100, 100);
 
 the coordinates are expresed as points and documentation says there are 72
 points per inch (this is at 72 dpi). But i need more resolution (300
 points
 per inch would be perfect). Is there any way to do this?.
 
 Thanks.
 
 ___
 
 Don't miss the 2002 Sprint PCS Application Developer's Conference
 August 25-28 in Las Vegas -
 http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
 
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/itext-questions

___

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

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



RE: [iText-questions] DefaultFontMapper.insertDirectory is (too) slow

2002-06-14 Thread Paulo Soares

If you just need a couple of fonts use this class (untested):

import com.lowagie.text.pdf.*;

public class SpeedFontMapper extends DefaultFontMapper {

/** Inserts a single font into the map. The encoding
 * will be CODEBaseFont.CP1252/CODE but can be
 * changed later.
 * @param file the font file name
 * @return CODEtrue/CODE if the font was inserted
 */
public boolean insertSingleFont(String file) {
String name = file.toLowerCase();
BaseFont bf = null;
try {
if (name.endsWith(.ttf) || name.endsWith(.afm)) {
bf = BaseFont.createFont(file, BaseFont.CP1252, false,
BaseFont.NOT_CACHED, null, null);
String names[][] = bf.getFullFontName();
bf = null;
insertNames(names, file);
}
else if (name.endsWith(.ttc)) {
String ttcs[] = BaseFont.enumerateTTCNames(file);
for (int j = 0; j  ttcs.length; ++j) {
String nt = file + , + (j + 1);
bf = BaseFont.createFont(nt, BaseFont.CP1252, false,
BaseFont.NOT_CACHED, null, null);
String names[][] = bf.getFullFontName();
bf = null;
insertNames(names, nt);
}
}
}
catch (Exception e) {
return false;
}
return true;
}
}

Best Regards,
Paulo Soares

 -Original Message-
 From: Erwin Achermann [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, June 14, 2002 11:05
 To:   iText ML (E-Mail)
 Subject:  RE: [iText-questions] DefaultFontMapper.insertDirectory is
 (too) slow
 
 Paulo, 
 it was (is) my first attempt to remedy for the problem by making one only
 instance of the DefaultFontMapper in our application. And every thread
 uses this one. But still it takes too long for the DefaultFontMapper to
 read in our font directory. We cannot afford the time on app startup, and
 even less on the first 'toPdf'-action. All I'd expect from the FontMapper
 is to build a table mapping font-name and -attributes to the appropriate
 font-file, so that the fontfactory later will know which file to load
 (avoiding a scan of the font directory in each
 FontFactory.getFont()-call). But the DefaultFontMapper does way more than
 that, apparently it instantiates each possible font... and then throws
 most of each instantiated font away again. 
 
 Cheers
 Erwin
 
  -Original Message-
  From: Paulo Soares [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 14, 2002 11:28 AM
  To: Erwin Achermann; iText ML (E-Mail)
  Subject: RE: [iText-questions] DefaultFontMapper.insertDirectory is
  (too) slow
  
  
  There's no problem here. First of all the class DefaultFontMapper is a
  generic class that may not be suitable for all the cases. You 
  can sub-class
  it or create a new one if special capabilities are needed.
  You only have to create an instance of it once and then use 
  it everywhere in
  other threads; I don't think the load time is that important 
  in this case.
  Lazy evaluation would require scanning the directory and 
  reading all the
  files to find the font, saving no time in the process.
  
  Best Regards,
  Paulo Soares
  
   -Original Message-
   From: Erwin Achermann [SMTP:[EMAIL PROTECTED]]
   Sent: Friday, June 14, 2002 10:08
   To:   iText ML (E-Mail)
   Subject:  [iText-questions] 
  DefaultFontMapper.insertDirectory is (too)
   slow
   
   Hi Bruno,
   
   we are facing the problem, that inserDirectory processes 
  250 font files,
   consuming more time than acceptable (8 seconds). I was 
  browsing to code
   and observed that for each font file a basefont is created. 
  This includes
   loading mapping tables (which is what we need in the first 
  place) but this
   also include construction of kerning tables, and numerous other
   datastructure: 
   
 TrueTypeFont.process() 
 ...
 fontName = getBaseFont();
 fullName = getNames(4); //full name
 familyName = getNames(1); //family name
 fillTables();
 readGlyphWidths();
 readCMaps();
 readKerning();
 ...
   
   I would propose that these font information are only loaded 
  when the font
   is actually needed in the document, and thus speeding up the
   insertDirectory-call. A lazy Font construction, if you wish. Is this
   problem recognized, planned to be solved or am I completely 
  mistaken here?
   
   
   Cheers
   Erwin
   
   
   ___
   
   Don't miss the 2002 Sprint PCS Application Developer's Conference
   August 25-28 in Las Vegas -
   http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
   
   ___
   iText-questions mailing list
   [EMAIL PROTECTED]
   https://lists.sourceforge.net/lists/listinfo/itext-questions
  
 
 

RE: [iText-questions] DefaultFontMapper.insertDirectory is (too) slow

2002-06-14 Thread Erwin Achermann

The problem with this is that the file ist completly read in to generate a new 
basefont. 
Because the FontFactory.createFont(...) calls 
new TrueTypeFont(filename, ...) and similar for other file types, only to get the 
names of the font 
String names[][] = bf.getFullFontName(); 
and then bf=null; again. 

I would hope that a  FontMapper.getFullFontName(filename) could be implemented without 
really building a new basefont, but only by peeking into the file. 

How difficult would that be? 

Cheers
Erwin



 -Original Message-
 From: Paulo Soares [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 14, 2002 12:34 PM
 To: Erwin Achermann; iText ML (E-Mail)
 Subject: RE: [iText-questions] DefaultFontMapper.insertDirectory is
 (too) slow
 
 
 If you just need a couple of fonts use this class (untested):
 
 import com.lowagie.text.pdf.*;
 
 public class SpeedFontMapper extends DefaultFontMapper {
 
 /** Inserts a single font into the map. The encoding
  * will be CODEBaseFont.CP1252/CODE but can be
  * changed later.
  * @param file the font file name
  * @return CODEtrue/CODE if the font was inserted
  */
 public boolean insertSingleFont(String file) {
 String name = file.toLowerCase();
 BaseFont bf = null;
 try {
 if (name.endsWith(.ttf) || name.endsWith(.afm)) {
 bf = BaseFont.createFont(file, BaseFont.CP1252, false,
 BaseFont.NOT_CACHED, null, null);
 String names[][] = bf.getFullFontName();
 bf = null;
 insertNames(names, file);
 }
 else if (name.endsWith(.ttc)) {
 String ttcs[] = BaseFont.enumerateTTCNames(file);
 for (int j = 0; j  ttcs.length; ++j) {
 String nt = file + , + (j + 1);
 bf = BaseFont.createFont(nt, 
 BaseFont.CP1252, false,
 BaseFont.NOT_CACHED, null, null);
 String names[][] = bf.getFullFontName();
 bf = null;
 insertNames(names, nt);
 }
 }
 }
 catch (Exception e) {
 return false;
 }
 return true;
 }
 }
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   Erwin Achermann [SMTP:[EMAIL PROTECTED]]
  Sent:   Friday, June 14, 2002 11:05
  To: iText ML (E-Mail)
  Subject:RE: [iText-questions] 
 DefaultFontMapper.insertDirectory is
  (too) slow
  
  Paulo, 
  it was (is) my first attempt to remedy for the problem by 
 making one only
  instance of the DefaultFontMapper in our application. And 
 every thread
  uses this one. But still it takes too long for the 
 DefaultFontMapper to
  read in our font directory. We cannot afford the time on 
 app startup, and
  even less on the first 'toPdf'-action. All I'd expect from 
 the FontMapper
  is to build a table mapping font-name and -attributes to 
 the appropriate
  font-file, so that the fontfactory later will know which 
 file to load
  (avoiding a scan of the font directory in each
  FontFactory.getFont()-call). But the DefaultFontMapper does 
 way more than
  that, apparently it instantiates each possible font... and 
 then throws
  most of each instantiated font away again. 
  
  Cheers
  Erwin
  
   -Original Message-
   From: Paulo Soares [mailto:[EMAIL PROTECTED]]
   Sent: Friday, June 14, 2002 11:28 AM
   To: Erwin Achermann; iText ML (E-Mail)
   Subject: RE: [iText-questions] 
 DefaultFontMapper.insertDirectory is
   (too) slow
   
   
   There's no problem here. First of all the class 
 DefaultFontMapper is a
   generic class that may not be suitable for all the cases. You 
   can sub-class
   it or create a new one if special capabilities are needed.
   You only have to create an instance of it once and then use 
   it everywhere in
   other threads; I don't think the load time is that important 
   in this case.
   Lazy evaluation would require scanning the directory and 
   reading all the
   files to find the font, saving no time in the process.
   
   Best Regards,
   Paulo Soares
   
-Original Message-
From:   Erwin Achermann [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, June 14, 2002 10:08
To: iText ML (E-Mail)
Subject:[iText-questions] 
   DefaultFontMapper.insertDirectory is (too)
slow

Hi Bruno,

we are facing the problem, that inserDirectory processes 
   250 font files,
consuming more time than acceptable (8 seconds). I was 
   browsing to code
and observed that for each font file a basefont is created. 
   This includes
loading mapping tables (which is what we need in the first 
   place) but this
also include construction of kerning tables, and numerous other
datastructure: 

TrueTypeFont.process() 
...
fontName = getBaseFont();
fullName = getNames(4); //full name

[iText-questions] tables

2002-06-14 Thread Aristo . Togliatti

Hi all,

is it possible to put 2 tables one on the left and one on the right of the
page at the same height?

Thx,

A.



___

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

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



Re: [iText-questions] tables

2002-06-14 Thread Matt Benson

Yes, using PdfPTable...

-Matt

--- [EMAIL PROTECTED] wrote:
 Hi all,
 
 is it possible to put 2 tables one on the left and
 one on the right of the
 page at the same height?
 
 Thx,
 
 A.
 
 
 

___
 
 Don't miss the 2002 Sprint PCS Application
 Developer's Conference
 August 25-28 in Las Vegas -

http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
 
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

https://lists.sourceforge.net/lists/listinfo/itext-questions


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

___

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

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



[iText-questions] sql 2000 db weirdness

2002-06-14 Thread Miller, Eric

I created some PDF documents from a form that is filled out online.  I then
placed the pdf in a sql 2000 database, storing it using the
PreparedStatement.setBinaryStream() method.  When I pull it out of the
database, for lack of better knowledge, I create the file again with the
following code:

OutputStream restoredfile = new FileOutputStream(file path);
int i;
while(true)
{  
i = istream.read();  
if(i == -1)  
{break;  }  
restoredfile.write(i);
}
}catch(Exception e)
{ out.print(e.toString()); }

istream is an inputstream that contains the result of a
ResultSet.getBinaryStream() method that pulled my binary stream out of the
database.  This file, once again, was filled out online, and it is just a
list of questions and answers.  The answers in the pdf file are values taken
from text areas online.  When I pull the binary stream out of the database
and restore it to the filesystem, the questions and headings are there, but
the answers to the questions are now gone!  Anyone else run into anything
like this?  Perhaps I am missing something simple.
Thanks in advance

___

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

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



RE: [iText-questions] sql 2000 db weirdness

2002-06-14 Thread Chris Ward

I would think that first you need to verify that you are getting the pdf's created 
properly - so save them as files first. Then make sure that you are saving the correct 
stream to the database. I would doubt that SQL Server would selectively take out the 
answers for you.

Chris

-Original Message-
From: Miller, Eric [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 10:27 AM
To: [EMAIL PROTECTED]
Subject: [iText-questions] sql 2000 db weirdness


I created some PDF documents from a form that is filled out online.  I then
placed the pdf in a sql 2000 database, storing it using the
PreparedStatement.setBinaryStream() method.  When I pull it out of the
database, for lack of better knowledge, I create the file again with the
following code:

OutputStream restoredfile = new FileOutputStream(file path);
int i;
while(true)
{  
i = istream.read();  
if(i == -1)  
{break;  }  
restoredfile.write(i);
}
}catch(Exception e)
{ out.print(e.toString()); }

istream is an inputstream that contains the result of a
ResultSet.getBinaryStream() method that pulled my binary stream out of the
database.  This file, once again, was filled out online, and it is just a
list of questions and answers.  The answers in the pdf file are values taken
from text areas online.  When I pull the binary stream out of the database
and restore it to the filesystem, the questions and headings are there, but
the answers to the questions are now gone!  Anyone else run into anything
like this?  Perhaps I am missing something simple.
Thanks in advance

___

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

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

___

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

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



[iText-questions] stretching a table

2002-06-14 Thread Alex Radka

I have a table that needs to span the whole page (leaving only a small
margin).

Using Table, I don't seem to be able to convince the table to go into the
margin.

I create my document
Document document = new Document(PageSize.LETTER.rotate(), 10, 10, 10, 10);

But the table, at best, has a 1 inch margin (other text has the correct
margin).

Using PdfPTable and  setWidthPercentage(100) I get the desired effect, but
PdfPCell doesn't have rowspan, which I need.  Is there anyway to set the
Width of the Table object, similar to PdfPTable, or simulate a rowspan in
PdfPTable/PdfPCell.  That or any other suggestions would be appreciated.

Thx,
Alex


___

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

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



RE: [iText-questions] sql 2000 db weirdness

2002-06-14 Thread Miller, Eric

Well, turns out I'm semi-retarded.  I noticed that the date on my pdf file
was also two days old...and then it hit me.  I had kept testing my project
again and again and forgot to delete previous entries in the database.  Most
of the information, including the key, was hard-coded for testing purposes,
and so I ended up with multiple entries with the same key.  My program was
accessing old database entries.  Looks like I should be more careful.
thanks
eric  

 -Original Message-
 From: Chris Ward [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, June 14, 2002 12:20 PM
 To:   iText (E-mail)
 Subject:  RE: [iText-questions] sql 2000 db weirdness
 
 I would think that first you need to verify that you are getting the pdf's
 created properly - so save them as files first. Then make sure that you
 are saving the correct stream to the database. I would doubt that SQL
 Server would selectively take out the answers for you.
 
 Chris
 
 -Original Message-
 From: Miller, Eric [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 14, 2002 10:27 AM
 To: [EMAIL PROTECTED]
 Subject: [iText-questions] sql 2000 db weirdness
 
 
 I created some PDF documents from a form that is filled out online.  I
 then
 placed the pdf in a sql 2000 database, storing it using the
 PreparedStatement.setBinaryStream() method.  When I pull it out of the
 database, for lack of better knowledge, I create the file again with the
 following code:
 
 OutputStream restoredfile = new FileOutputStream(file path);
 int i;
 while(true)
 {  
   i = istream.read();  
   if(i == -1)  
   {break;  }  
   restoredfile.write(i);
 }
 }catch(Exception e)
 { out.print(e.toString()); }
 
 istream is an inputstream that contains the result of a
 ResultSet.getBinaryStream() method that pulled my binary stream out of the
 database.  This file, once again, was filled out online, and it is just a
 list of questions and answers.  The answers in the pdf file are values
 taken
 from text areas online.  When I pull the binary stream out of the database
 and restore it to the filesystem, the questions and headings are there,
 but
 the answers to the questions are now gone!  Anyone else run into anything
 like this?  Perhaps I am missing something simple.
 Thanks in advance
 
 ___
 
 Don't miss the 2002 Sprint PCS Application Developer's Conference
 August 25-28 in Las Vegas -
 http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
 
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 ___
 
 Don't miss the 2002 Sprint PCS Application Developer's Conference
 August 25-28 in Las Vegas -
 http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
 
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/itext-questions

___

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

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