Re: [iText-questions] Re: Table of Contents in PDF

2005-10-13 Thread Bruno Lowagie

Jason Frank wrote:

The main suggestion that I 
saw was to put the table of contents at the end of the document, and then 
rearrange the pages to put it at the beginning once you are done.  This 
implies to me that things are not being written to the output stream "as you 
go", but instead are saved up in memory and then flushed to the stream at some 
later time, perhaps when the document is closed.  For a large document, this 
could be problematic, because everything has to fit in memory at once.



There is more than one way to do this.
For a large report, I would write the content to one file and the ToC to 
another one. Afterwards, you can concatenate both files.

br,
Bruno


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] PDF-form query

2005-10-13 Thread Nitin Tomer



Hi,
 
    I have a 
PDf form, which has a combo-box - ACombo with some elements in it. I am 
trying to add some more elemnts in it using iText, the code snipplet is given 
below - 
 
    
    PdfReader reader = new 
PdfReader("combo.pdf");    
PdfStamper stamp = new PdfStamper(reader, new     
        
FileOutputStream("combo1.pdf"));    
AcroFields form = 
stamp.getAcroFields();    
String options[] = {"Red", "Green", "Blue", 
"Magenta"};    
PdfFormField field = PdfFormField.createCombo(stamp.getWriter(), true, options, 
0);            
field.setWidget(new Rectangle(100, 700, 180, 720),     
        
PdfAnnotation.HIGHLIGHT_INVERT);    
field.setFieldName("ACombo");    
field.setValueAsString("Red");    
stamp.addAnnotation(field,1);    
stamp.close();
 
However it is not giving the desired results. The file combo1.pdf is 
created, a combo-box shped object is shown, but it's down-arror is not 
clickable; it just like a image, nothing happens when I click on 
it.Please look into this snipplet and tell me what I am doing 
wrong.Regards and ThanxNitin




Disclaimer :- This e-mail message including any attachment may contain confidential, proprietary or legally privileged information. It should not be used by who is not the original intended recipient. If you have erroneously received this message, you are notified that you are strictly prohibited from using, coping, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd and / or its subsidiary Companies accept no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unlessthe sender does so expressly with due authority of Newgen Software TechnologiesLtd and / or its subsidiary Companies, as applicable.




[iText-questions] adding values to pdf template List Box

2005-10-13 Thread Reddy, Damodar








Hi,

 

    We
have pdf template which has Text Fields, Checkbox and ListBox. We could able to
add values to Text Fileds, and CheckBox using iText. 

    

    We
used  AcroFields.setField( “Acrofield name”, “value”);
to add values,

    

But we could not add
values to ListBox. How to add values to ListBox. Tried to do like about, but
could not.

 

Any help would be appreciated.

 

Thanks

Damdoar

 

 

Damodar. Y

0091-9341042200

 





**
This message contains confidential 
information intended only for the use of the addressee(s) 
named above and may contain 
information that is legally privileged.  If you are not the 
addressee, or the person 
responsible for delivering it to the addressee, you are hereby notified that 
reading, disseminating, distributing or copying this message is strictly 
prohibited.  
If you have received this message 
by mistake, please immediately notify us by replying to the 
message and delete the original 
message immediately thereafter.
 
Thank 
you.   
FADLD Tag**





[iText-questions] Re: Table of Contents in PDF

2005-10-13 Thread Jason Frank
Ok, I am a little bit of an idiot.  I did find how to search the list, and saw 
that this question has come up quite frequently.

However, I did not really understand the answer.  The main suggestion that I 
saw was to put the table of contents at the end of the document, and then 
rearrange the pages to put it at the beginning once you are done.  This 
implies to me that things are not being written to the output stream "as you 
go", but instead are saved up in memory and then flushed to the stream at some 
later time, perhaps when the document is closed.  For a large document, this 
could be problematic, because everything has to fit in memory at once.  Am I 
understanding this correctly?  Are there ways to limit the amount of memory 
required, e.g. by flushing to the stream at an earlier time?

Thanks for any advice.




---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] How do I use iText in a Linux environment

2005-10-13 Thread Kieth Biasillo
I wrote the Java code I needed using Windows, however the 
implementation ultimately needs to reside in Linux.  I need
 to know how to install the API into this OS.  Do I need to
 download the source and then use ANT to build there?  I
would really like to just download a Linux compatible Jar 
file if that was possible.

Does anyone have any information at all as to how to do 
this please?

Thanks!



---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Re: RTF2Writer doesn't work correctly!!!

2005-10-13 Thread Stefano
Mark Hall  edu.uni-klu.ac.at> writes:

> 
> On Wednesday 12 October 2005 12:36, Stefano wrote:
> > I'm trying to use iText to write rtf and how it's suggested, i'm using
> > RTF2Writer, but if i use color, background and other, it doesn't show them
> > in rtf, while old RTFWriter does it. Do I make some mistake or do I stiil
> > have to use RTFWriter?
> Therw as a bug in the way the RtfWriter2 handled styles & colour if no 
> fontname was set. I've committed a change to the CVS repository. You can 
> either wait for the next release or modify your Paragraph initialisations 
> like this:
> 
> Paragraph paragraph2 = new Paragraph("", new Font(Font.TIMES_ROMAN));
> 
> and replace the font name with the one you want to use.
> 
> Greetings,
> Mark


Thanks, but what can I do if I need to use FontFactory? 
I'm doing an application which reads from an html (editor) and then it writes 
rtf or pdf. 
I debugged HTMLWorker and I saw it can't do yet, so I'm trying to adapt html 
to use iText anyway, but i saw 2 problems: (1) HTMLWorker doesn't see styles 
inside html-tags, so I've to use only  tag; (2) FontFactory inside the 
code check if the passed style (for example "Times New Roman") is equal to one 
of constants from Font class (for example "Times-Roman"), so I don't 
understand how it can find the right one, because the string is always 
different than the name of font styles (HTMLWorker use FontFactory too). 
And I lost background color too :( 

Greetings,
Stefano

PS: sorry for my bad english and thank to you again alot, your work is very 
good!!! 






---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] WordML to PDF...

2005-10-13 Thread Holtz III, Dean








Hi,

 

I’ve been experimenting with iTextSharp for a couple
of days and I’m really impressed!

 

I’ve been looking for a way to programmatically
convert WordML to PDF, including converting any contained Word Form Fields to
PDF Acroform fields.  I’m wondering if anyone has any experience
with this or can make any recommendations on the general issue, or on these
specific questions:

 

Could this type of conversion be achieved by creating a
TagMap, then passing the WordML file and the tag map into XmlParser.Parse()?

Am I faced with having to endure manually parsing WordML,
then creating corresponding PDF elements?

 

Thanks,

Dean








[iText-questions] Table of Contents in PDF

2005-10-13 Thread Jason Frank
Hello,

I am new to iText.  So far I am very happy to have found something that looks 
like it will help me out a lot on my latest project.  I have a question about 
generating a table of contents using the PdfWriter.  I looked through a number 
of the postings here, but without a search feature (or at least I could not 
find a search feature), I cannot be sure that someone else has not posted a 
similar question.

I am trying to generate a big "report".  This report summarizes information 
collected from a survey, with each question in the survey summarized on a 
separate page in the report (the summary for a given question may span 2 
pages, but usually just 1).  There could be up to several thousand questions, 
so the report is going to be quite big.  This leads me to want to provide a 
way for readers of the report to find the sections they are interested in.

For viewing the report online, it seems that using bookmarks and the PDF 
Outline is exactly what I want.  But, if someone prints the report, that won't 
help.  So I want to include a true table of contents, like you might find in a 
Word document.

I don't have any concerns with logically generating a table of contents.  My 
concern is that the table of contents needs to be placed in the document in 
front of all the pages of the report, and I am pretty sure that all writing to 
the file is done sequentially.  So as I add a new question summary to the 
report, I cannot update the table of contents to have a new entry, because I 
am already past where the table of contents lives in the document.

Sorry for the long explanation, but I wanted to be clear about what I'm trying 
to do.  So far the only thing I have been able to think of is to create two 
separate PDF documents, one for the table of contents and one for the actual 
report, and then merge them.  However, I am not sure if I could then make the 
necessary updates to the resulting document, for example to have the table of 
contents entries be linked to the pages they refer to.

Any advice, or pointers to examples, would be appreciated.

Thanks,
Jason



---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] javascript

2005-10-13 Thread dave shep
I am trying to add _javascript_ to an iText document. In the html version the onclick() action calls a _javascript_ functions which then updates other fields in the form as well as changing the style of the item clicked.
 
Is this possible with iText and, if so, do you have any examples of code to examinie.
 
thanks
		 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

[iText-questions] Question about JavaScript to Sum

2005-10-13 Thread wang yun
Dear Paulo,

I try to add the js code into "text 4" to get the sum
value of the other 3 fileds.

I try to use the JS code by Adobe acrobat. But, it
didn't work: 
String code = "AFSimple_Calculate(\"SUM\", new Array
(\"Text 1\", \"Text 2\", \"Text 3\"));";

Please give me advise.

Thanks

yun


Document document = new Document(PageSize.A4, 50, 50,
50, 50);

PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream("text_fields.pdf"));

document.open(); int yp; TextField app;
PdfFormField field;

yp = 700;
app = new TextField(writer, new Rectangle(100, yp, 100
+ 100, yp + 20), "Text 1");
field = app.getTextField();
writer.addAnnotation(field);

yp = 650;
app = new TextField(writer, new Rectangle(100, yp, 100
+ 100, yp + 20), "Text 2");
field = app.getTextField();
writer.addAnnotation(field);

yp = 600;
app = new TextField(writer, new Rectangle(100, yp, 100
+ 100, yp + 20), "Text 3");
field = app.getTextField();
writer.addAnnotation(field);

yp = 550;
app = new TextField(writer, new Rectangle(100, yp, 100
+ 100, yp + 20), "Text 4");
field = app.getTextField();

String code = "AFSimple_Calculate(\"SUM\", new Array
(\"Text 1\", \"Text 2\", \"Text 3\"));";
PdfAction ac = PdfAction.javaScript(code, writer);
field.setAction(ac);
writer.addAnnotation(field);

document.close();
System.out.println("Finished.");




---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Landscape Orientation - Legal Size

2005-10-13 Thread Mitch Freed



This is most likely the setting in Adobe to "Choose 
Paper Source by PDF page size" located at the bottom of the print 
dialog -- not a problem of iText.
 
-Mitch
 


From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of 
[EMAIL PROTECTED]Sent: Thursday, October 13, 2005 11:41 
AMTo: itext-questions@lists.sourceforge.netSubject: 
[iText-questions] Landscape Orientation - Legal Size
Hi, I just created a PDF file using the Java Library (iText) and the document 
is produced ok.  The orientation of the document is Landscape and the size 
is 14 x 8.5 (Legal) but when I click on the Print function (of the Acrobat 
Reader), it still prints it on 11 x 8.5. (the Landscape feature seems to be 
translated to the printer ok... but not the size)... We need to create these PDFs so that the users will only need 
to click print and the document will come out how we wanted it to be 
displayed. My line of code is: 
Document doc = new Document(PageSize.LEGAL.rotate()); 
Has anyone encountered this before? 
Let me know ... thanks Remi Paquette


RE: [iText-questions] Landscape Orientation - Legal Size

2005-10-13 Thread Paulo Soares
It's up to the printer to find the right paper size. You can have
PdfWriter.setViewerPreference(PdfWriter.PrintScalingNone) to make sure
taht it won't scale but it only works in Acrobat 7. 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Thursday, October 13, 2005 6:41 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Landscape Orientation - Legal Size
> 
> 
> Hi, 
> 
> I just created a PDF file using the Java Library (iText) and 
> the document is produced ok.  The orientation of the document 
> is Landscape and the size is 14 x 8.5 (Legal) but when I 
> click on the Print function (of the Acrobat Reader), it still 
> prints it on 11 x 8.5. (the Landscape feature seems to be 
> translated to the printer ok... but not the size)... 
> 
> We need to create these PDFs so that the users will only need 
> to click print and the document will come out how we wanted 
> it to be displayed. 
> 
> My line of code is: 
> 
> Document doc = new Document(PageSize.LEGAL.rotate()); 
> 
> Has anyone encountered this before? 
> 
> Let me know ... thanks 
> 
> Remi Paquette
> 


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] table and cell question

2005-10-13 Thread Paulo Soares
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of S G
> Sent: Thursday, October 13, 2005 6:20 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] table and cell question
> 
> i'm generating a table that needs to be tightly
> formatted. i.e. fixed widths and text inside
> the cells have to fit.
> 
> i'm using pdfptable
> 
> 1. as i'm adding cells, can i find the height of
> the table so far?
>

setTotalWidth() and then getTotalHeight()
 
> 2. if the text inside a cell does not fit - i need to
> make the font smaller on a per cell basis. if the cell
> gets too small...then split across multiple lines etc.
> 
> how do i do this...i assume cellevents...but haven't
> been able to figure it out exactly.
> 

Not cellevents. celevents can't change the cell content. You make your
calculations outside the cell.

> 3. is there a way to set up the table structure
> (widths, format etc). and then add content on the same
> object on a per page basis.
> 
> for example:
>- set up table object
>- for each page do
>  set table.cell(1,1).setText("???");
> 

No.

> thanks.
> 
> 
> 
> 
>   
> __ 
> Start your day with Yahoo! - Make it your home page! 
> http://www.yahoo.com/r/hs
> 
> 
> ---
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, 
> discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Generating and Concatenating multiple pdfs

2005-10-13 Thread Paulo Soares
It's possible but you'd be shooting your foot (or head). How would you
handle fields of the same name? Would they echo each other? Would you
rename the fields? The way to go is to concatenate the flattened forms.

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Christopher Hayen
> Sent: Thursday, October 13, 2005 4:47 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Generating and Concatenating multiple pdfs
> 
> Is it possible to fill in multiple forms and then concatenate 
> them and display them out as a single form ?  Sorry but I 
> can't find an example.  This would be run from a web 
> application while pulling information out of a database.
> 
> 


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] tables and cells

2005-10-13 Thread S G
i'm generating a table that needs to be tightly
formatted. i.e. fixed widths and text inside
the cells have to fit.

i'm using pdfptable

1. as i'm adding cells, can i find the height of
the table so far?

2. if the text inside a cell does not fit - i need to
make the font smaller on a per cell basis. if the cell
gets too small...then split across multiple lines etc.

how do i do this...i assume cellevents...but haven't
been able to figure it out exactly.

3. is there a way to set up the table structure
(widths, format etc). and then add content on the same
object on a per page basis.

for example:
   - set up table object
   - for each page do
 set table.cell(1,1).setText("???");

thanks.





__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Landscape Orientation - Legal Size

2005-10-13 Thread rpaquett

Hi,

I just created a PDF file using the Java
Library (iText) and the document is produced ok.  The orientation
of the document is Landscape and the size is 14 x 8.5 (Legal) but when
I click on the Print function (of the Acrobat Reader), it still prints
it on 11 x 8.5. (the Landscape feature seems to be translated to the printer
ok... but not the size)...

We need to create these PDFs so that the
users will only need to click print and the document will come out how
we wanted it to be displayed.

My line of code is:

Document doc = new
Document(PageSize.LEGAL.rotate());

Has anyone encountered this before?

Let me know ... thanks

Remi Paquette

[iText-questions] Generating and Concatenating multiple pdfs

2005-10-13 Thread Christopher Hayen
Is it possible to fill in multiple forms and then concatenate them and
display them out as a single form ?  Sorry but I can't find an
example.  This would be run from a web application while pulling
information out of a database.


[iText-questions] table and cell question

2005-10-13 Thread S G
i'm generating a table that needs to be tightly
formatted. i.e. fixed widths and text inside
the cells have to fit.

i'm using pdfptable

1. as i'm adding cells, can i find the height of
the table so far?

2. if the text inside a cell does not fit - i need to
make the font smaller on a per cell basis. if the cell
gets too small...then split across multiple lines etc.

how do i do this...i assume cellevents...but haven't
been able to figure it out exactly.

3. is there a way to set up the table structure
(widths, format etc). and then add content on the same
object on a per page basis.

for example:
   - set up table object
   - for each page do
 set table.cell(1,1).setText("???");

thanks.





__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Infinite Loop

2005-10-13 Thread Isabelle Ulfsdotter
Hello,

I am using itext to generate a two column PDF (balanced columns) that
contains any number of news articles as decided by the user. I based my
Servlet on the example provided by itext where the user clicks publish, and
a screen refreshes every second until the PDF is complete.
I am now seeing that sometimes the screen just keeps refreshing, as though
it is in an infinite loop. Has anyone ever seen this before? What was the
cause?

Best,
Isabelle 


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PdfReader and incorrect PageSize

2005-10-13 Thread Bruno Lowagie

Kruno wrote:


  Rectangle rect = reader.getPageSizeWithRotation(1);
 


See the corrected method name.
br,
Bruno


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] PdfReader and incorrect PageSize

2005-10-13 Thread Krunoslav Požega
I  have one problem with PdfReader and landscape pages in PDF 
document. When I read PDF documents which page(s) are in landscape, 
getPageSize() returns values as if this page is portrait.

For example:

PdfReader reader = new PdfReader(new FileInputStream("some_pdf"));
Rectangle rect = reader.getPageSize(1);
 
System.out.println("Page height : " + rect.height());
System.out.println("Page width : " + rect.width());
System.out.println("Page rotation : " + rect.getRotation());
 
 
no matter if  1st page of "some_pdf" is portrait or landscape it 
returns:
 
Page height : 842.0
Page width : 595.0
Page rotation : 0

 
What's the problem here ? How can I know if page in PDF is landscape 
or portrait ?



To sporočilo in vse njegove morebitne priloge lahko vsebujejo zaupne 
informacije in so last podjetja Infotehna d.o.o. ter namenjene izključno 
naslovniku. V kolikor ste sporočilo prejeli, pa ni namenjeno vam, Vas prosimo, 
da nas o tem obvestite, sporočilo pa izbriąete. Kakrąnokoli nepooblaąčeno 
ąirjenje vsebine sporočila je izrecno prepovedano. Vsa elektronska poąta je 
pregledana z antivirusnim programom. 

This message and any attachments it may contain are confidential information 
and are the propriety of Infotehna, therefore intended solely  for the 
recipient. If you are not the intended recipient, or have received this e-mail 
by mistake, please notify the sender immediately, and delete this e-mail. Any 
unauthorized copying, disclosure or distribution of this e-mail, or its content 
is strictly forbidden. E-mail message is scanned by anti-virus software.



---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] PdfReader and incorrect PageSize

2005-10-13 Thread Kruno
I  have one problem with PdfReader and landscape pages in PDF document.
When I read PDF documents which page(s) are in landscape, getPageSize()
returns values as if this page is portrait.

For example:

   PdfReader reader = new PdfReader(new FileInputStream("some_pdf"));
   Rectangle rect = reader.getPageSize(1);

   System.out.println("Page height : " + rect.height());
   System.out.println("Page width : " + rect.width());
   System.out.println("Page rotation : " + rect.getRotation());


no matter if  1st page of "some_pdf" is portrait or landscape it returns:

Page height : 842.0
Page width : 595.0
Page rotation : 0


What's the problem here ? How can I know if page in PDF is landscape or
portrait ?





---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Last Page Margins

2005-10-13 Thread Mitch Freed
Worked like a charm, thanks Paulo!

If anyone is interested in my solution shoot me off an email and I can
send sample code.

-Mitch

-Original Message-
From: Paulo Soares [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 11, 2005 3:05 PM
To: Mitch Freed; itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Last Page Margins

Not with plain Document.Add(). You'll need to create your own layout
with ColumnText.

- Original Message -
From: "Mitch Freed" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, October 11, 2005 9:53 PM
Subject: [iText-questions] Last Page Margins


Is there any way to specify different margins for the last page of a
document? We have certain documents that need say a 3in. bottom margin
on the last page of the document. I have been reading through the
documentation and haven't seen anything suggesting something like this
is possible.

Thanks,

Mitch Freed
[EMAIL PROTECTED]



---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] RTF2Writer doesn't work correctly!!!

2005-10-13 Thread Mark Hall
On Wednesday 12 October 2005 12:36, Stefano wrote:
> I'm trying to use iText to write rtf and how it's suggested, i'm using
> RTF2Writer, but if i use color, background and other, it doesn't show them
> in rtf, while old RTFWriter does it. Do I make some mistake or do I stiil
> have to use RTFWriter?
Therw as a bug in the way the RtfWriter2 handled styles & colour if no 
fontname was set. I've committed a change to the CVS repository. You can 
either wait for the next release or modify your Paragraph initialisations 
like this:

Paragraph paragraph2 = new Paragraph("", new Font(Font.TIMES_ROMAN));

and replace the font name with the one you want to use.

Greetings,
Mark
-- 
You are going to have a new love affair.

My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc


pgpdNY8MXtZyZ.pgp
Description: PGP signature


RE: [iText-questions] Distress call - Adding combo-box elements programmatically

2005-10-13 Thread Paulo Soares
There's no direct support for that although it's possible to do if you
know the pdf internals. The idea is to change the combo box values in
the annotation and then use PdfStamper to set some value to generate the
appearance.

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Nitin Tomer
> Sent: Tuesday, October 11, 2005 1:54 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Distress call - Adding combo-box 
> elements programmatically
> 
> Hi,
>  
> I searched a lot on net and tried other things, but 
> unable to make any progess, please suggest something.
>  
> \N
> - Original Message - 
> From: Nitin Tomer   
> To: itext-questions@lists.sourceforge.net 
> Sent: Monday, October 10, 2005 4:19 PM
> Subject: Adding combo-box elements programmatically
> 
> Hi,
>  
> I am new to iText forum and thi sis my first post. We use 
> PDF forms in a business process. The form is created manually 
> using Adobe Acrobat professional. In this form I want to 
> populate elements in a  combo box programmatically. Please 
> suggest some way to do that.
>  
> Regards
>  
> Nitin
> Disclaimer :- This e-mail message including any attachment 
> may contain confidential, proprietary or legally privileged 
> information. It should not be used by who is not the original 
> intended recipient. If you have erroneously received this 
> message, you are notified that you are strictly prohibited 
> from using, coping, altering or disclosing the content of 
> this message. Please delete it immediately and notify the 
> sender. Newgen Software Technologies Ltd and / or its 
> subsidiary Companies accept no responsibility for loss or 
> damage arising from the use of the information transmitted by 
> this email including damage from virus and further 
> acknowledges that any views expressed in this message are 
> those of the individual sender and no binding nature of the 
> message shall be implied or assumed unlessthe sender does so 
> expressly with due authority of Newgen Software 
> TechnologiesLtd and / or its subsidiary Companies, as applicable. 
> 


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions