[iText-questions] newPage() not throwing exception

2007-01-28 Thread mister bean

The Javadocs for newPage() state:

   Throws:  DocumentException - when a document isn't open yet, or has been
closed

However, in my unit tests I am finding that when Document is closed, the
newPage() call does not raise a Document exception. 

I can step through the code and see that the Document exists and open=false
at the time of the call to newPage(). Can you verify that the docs are
correct? 

Many thanks,

Mr. Bean
platypus.pz.org



-- 
View this message in context: 
http://www.nabble.com/newPage%28%29-not-throwing-exception-tf3129636.html#a8671563
Sent from the iText - General mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] placing pdfptable on existing pdfpage and inbetween the texts.

2007-01-28 Thread Bruno Lowagie
KUMAR PRASHANT wrote:
 
 i want to place pdfptable on an existing pdf page.which i am using as a 
 template.there are texts written on the page.in http://page.in between 
 of them i want to insert the table.can anyone help me plz.

You need PdfStamper, getOverContent and writeSelectedRows.
Of course you need to know where to add the table.
Either you have the coordinates, or the template PDF
has a field that can give you the coordinates.
br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Documentation error in newPage() ?

2007-01-28 Thread Bruno Lowagie
mister bean wrote:
 In the Javadoc for Document.newPage(), it says iText throws a
 DocumentException if newPage() is called on a closed document. My unit tests
 cannot reproduce this behavior. 

I'll have a look and see if I can reproduce it.

 Moreover the source code from Document.java indicates that if the document
 is closed, you simply return without throwing any exception.

In that case, the documentation is outdated.

 listener.newPage();

PdfDocument implements DocListener and can throw an exception.
Maybe it's possible to bring PdfDocument in an inconsistent state.
For instance by pausing/resuming PdfWriter, and by doing so cause
a DocumentException. I'm not sure if what I tell here makes sense,
but in such a case, I'd prefer to have a DocumentException tell me
what is happening. I'll have a look at it.
br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Converting PDF form to HTML form

2007-01-28 Thread Dirk.Weigenand
Michael Dolgonos [EMAIL PROTECTED] writes:

 Hi,
 I know this question was asked before but I couldn't find if it has been 
 resolved. I have a PDF file that contains a form and would like to convert it 
 into an HTML file that will contain a form with the same field types - text, 
 check boxes and radio buttons. Can anyone provide any help or suggestion. May 
 be there are other tools that can do the job.

Do you have an xdp representation of that PDF file? If so you can use
xslt to transform the form to html.

I have such a beast lying around. Not very useful if you have multiple
pages since then those will be displayed one over another.

If there is interest on the list i'll make it avalaible.

regards
Dirk
-- 
_
RISC: Relegate Important Stuff to Compiler


pgpPWXcoeXwLz.pgp
Description: PGP signature
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Create RTF file with greek char

2007-01-28 Thread Mark Hall
On Friday 26 January 2007 22:15, Henry Lu wrote:
 How do I add greek characters in to my RTF file when I am generating a
 RTF file?
Add them with '\u' with the correct unicode value for the characters you 
wish to add.

Greetings,
Mark
-- 
You're currently going through a difficult transition period called Life.

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


pgpfnmDEWUSvJ.pgp
Description: PGP signature
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Please Help with weird issue

2007-01-28 Thread mike smith

Hi,

Thanks for your help.  I have tried to do what you said, but when I tried 
it, I always ran into some error (e.g Page getting cut off or other text 
showing up that I don't want).

I have attached a sample file for you to look at (see attachment in original 
mail message).  The sample file has the following characteristics:
- Page 1 - Media Box: [0, 0, 607, 756], Crop Box: [53.5, 21.5, 534.5, 717.3]
- Page 2 - Media Box: [0, 0, 681, 879], Crop Box: [27.1, 27.4, 649.2, 809.3]

All I want to do is scale every page onto 8.5 x 11 so that it is the maximum 
size to fit on that page and is scaled proportionately.  If it is smaller 
than the page, I want to make sure that it is centered on the page.  As you 
can see, the Media Box is larger than the Crop Box.  There seems to be text 
and stuff that is located outside the Crop Box that I don't want to show up 
in the final page.  I want the contents to be the same thing that you see 
when you open the file in Adobe.

I was wondering if you could please show me the detailed steps to accomplish 
what I should try.  Your help is much appreciated.  I have no more hair to 
pull out!

From: Bruno Lowagie [EMAIL PROTECTED]
Reply-To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
To: Post all your questions about iText here 
itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] Please Help with weird issue
Date: Sat, 27 Jan 2007 10:32:54 +0100

mike smith wrote:
  If I try to print through Adobe, in the print dialog window, you can use
  some useful properties (in the Page Handling section, like Shrink large
  pages and Fit to Printer Margins and Auto Rotate and Center).  This
  seems to do what I am looking for.

Check the PDF Reference page 580.

The only options available using PDF syntax are
PrintScaling AppDefault (the one last selected in Adobe Reader)
and PrintScaling None (no scaling). This viewer preference is
implemented in the current iText version but won't help you.

New printer settings were introduced in PDF1.7, and I implemented
them all. They will be available in the next release.
I also implemented the PrintArea and PrintClip preferences;
these will also be available in the next release.
However, these still won't solve your problem.

The reality is that you can't define all the printer settings
in the PDF file. Instead you may want to use iText to create
a new document (with PdfWriter) and add all the pages of the
original document (read with PdfReader) as an imported page
(PdfImportedPage) that is scaled to the desired size.

br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share 
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

_
Buy what you want when you want it on Sympatico / MSN Shopping  
http://shopping.sympatico.msn.ca/content/shp/?ctId=2,ptnrid=176,ptnrdata=081805


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Optional content in iTextSharp and related functionality

2007-01-28 Thread Ignacio Ruiz-de-Conejo

Hello:

I´m adding optional content in a layer using the PdfLayer() function.

I´m using the iTextSharp porting for .NET, and I don´t see there two of the
functions that the Java implementation includes, in particular the one that
sets the default visibility status( PDFLayer.setOn(bool)), and the one that
prevents the layer to be displayed on the panel with the list of layers by
Acrobat (PDFLayer.setOnPanel(bool)).

Is that a functionality missing in the version I am using (3.1.8), or has it
been implemented in a different way?

Thanks,
   Ignacio
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] Optional content in iTextSharp and relatedfunctionality

2007-01-28 Thread Paulo Soares
If you don't find a method try a property without the set/get prefix.

Paulo

- Original Message - 
From: Ignacio Ruiz-de-Conejo [EMAIL PROTECTED]
To: iText-questions@lists.sourceforge.net
Sent: Sunday, January 28, 2007 10:03 PM
Subject: [iText-questions] Optional content in iTextSharp and 
relatedfunctionality


Hello:

I´m adding optional content in a layer using the PdfLayer() function.

I´m using the iTextSharp porting for .NET, and I don´t see there two of the
functions that the Java implementation includes, in particular the one that
sets the default visibility status( PDFLayer.setOn(bool)), and the one that
prevents the layer to be displayed on the panel with the list of layers by
Acrobat (PDFLayer.setOnPanel(bool)).

Is that a functionality missing in the version I am using (3.1.8), or has it
been implemented in a different way?

Thanks,
Ignacio






 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share 
 your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV





 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 Buy the iText book: http://itext.ugent.be/itext-in-action/
 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


Re: [iText-questions] placing pdfptable on existing pdfpage and inbetween the texts.

2007-01-28 Thread KUMAR PRASHANT

Dear Bruno,
i am sending my code in which i am trying to place a
pdfptable on existing pdf.this existing pdf has multiline text.i have to
place the table in between the text.with this code there is no compile time
error nor any runtime error.it creates one pdf WriteSelecredRow.but it
shows that its contents are of 0 bytes and when i am trying to open it it
shows error that file has been corrupted.please help me.Thanks in advance.
:-)


On 1/28/07, Bruno Lowagie [EMAIL PROTECTED] wrote:


KUMAR PRASHANT wrote:

 i want to place pdfptable on an existing pdf page.which i am using as a
 template.there are texts written on the page.in http://page.in between
 of them i want to insert the table.can anyone help me plz.

You need PdfStamper, getOverContent and writeSelectedRows.
Of course you need to know where to add the table.
Either you have the coordinates, or the template PDF
has a field that can give you the coordinates.
br,
Bruno

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/





--
KP
import java.io.FileOutputStream;

import com.lowagie.text.Document;
import com.lowagie.text.PageSize;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Rectangle;
import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfStamper;
import com.lowagie.text.pdf.*;


/**
 * Writing a PdfPTable at an absolute position.
 */
public class WriteSelectedRows {

public static void main(String[] args) {
Document document = new Document();

try {
PdfReader reader = new PdfReader(aish1.pdf);
PdfStamper stamp = new PdfStamper(reader, new 
FileOutputStream(WriteSelectedRows.pdf));
PdfContentByte over=stamp.getOverContent(1) ;
PdfPTable table = new PdfPTable(4);
for (int k = 0; k  24; ++k) {
table.addCell(KP);
}
table.setTotalWidth(300f);
table.writeSelectedRows(0, 1, 100,300,over );
} catch (Exception de) {
de.printStackTrace();
}
}
}
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/


[iText-questions] Inserting Hidden fields into a PDF document

2007-01-28 Thread Tom Bevan
Could someone please post a snippet of code that demonstrates how to
insert a hidden field into a PDF document?

 

Whenever I add a field which is not written out it just seems to wipe
out the entire form.

 

 

 

Thanks.

 

 

Tom



This email and any files transmitted with it may be confidential and are 
intended solely for the use of the individual or entity to whom they are 
addressed. This email may contain personal information of individuals, and be 
subject to Commonwealth and/or State privacy laws in Australia. This email is 
also subject to copyright. If you are not the intended recipient, you must not 
read, print, store, copy, forward or use this email for any reason, in 
accordance with privacy and copyright laws. If you have received this email in 
error, please notify the sender by return email, and delete this email from 
your inbox. 
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/