Re: [iText-questions] Help Bruno Out !

2007-01-18 Thread Matt Benson
The only problem with this suggestion is that if there
are no ridiculous questions on the mailing list, I
won't have Paulo's snippy answers to make me laugh. 
;)

-Matt

--- robert engels [EMAIL PROTECTED] wrote:

 I have monitored this list for quite a while now,
 and I am amazed by  
 the audacity of many people.
 
 You are writing for assistance. The least you can do
 it is first try  
 your best, and then do the bare minimum to allow
 Bruno or others to  
 help with the minimum of effort on their part.
 
 I suggest that neither Bruno, nor anyone else, even
 attempt to answer  
 a person's question regarding a code problem, unless
 you can do the  
 following
 
 javac -classpath itext.jar SomeClass.java
 java -classpath itext.jar SomeClass
 
 and the program MUST compile !
 
 The submitter must provide SomeClass.java that
 compiles without  
 errors. If you cannot get it to compile without
 errors, you need to  
 start with some basic java knowledge, and/or bother
 someone on a  
 coding java mailing list.
 
 You need to pare down your problem to the minimum
 amount of code that  
 clearly demonstrates the issue.
 
 If you cannot do this, no one should attempt to
 answer your question.
 
 I am betting however that is doing this, most of you
 will solve your  
 own problems, leaving Bruno and others more time to
 enhance iText or  
 do whatever else they might enjoy more than wasting
 time.
 
 Have a nice day.
 Robert Engels
 
 
 

-
 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/
 




 

Need Mail bonding?
Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=listsid=396546091

-
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] book review 'iText in Action'

2006-12-07 Thread Matt Benson
Great job, Bruno.  I hope to purchase the book soon. 
I noticed that on the Manning site it's not
cross-referenced from the Java section, which I feel
is bad for would-be buyers and thus for Manning as a
company.  I mention it just in case you have any
influence here... :)

br,
Matt

--- Bruno Lowagie (iText) [EMAIL PROTECTED] wrote:

 Hello all,
 I posted this yesterday, but the mailing list is
 acting weird again.
 I don't find my mail in the archives. Anyway,
 yesterday I found the
 first online book review of 'iText in Action'.
 It was written by the developer of JFreeChart, David
 Gilbert:
 http://www.jfree.org/reviews/itextinaction.html
 You can vote for the review on DZONE:
 http://www.dzone.com/links/itext_in_action.html
 I've also added it to Digg:

http://digg.com/software/First_book_review_iText_in_Action_published_by_Manning_Publications
 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/
 



 

Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index

-
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] iText license

2006-10-06 Thread Matt Benson
What problems do you have with MPL and LGPL?

--- Marcel Janál [EMAIL PROTECTED] wrote:

 Dear authors,
 we would like to use iText as a library for working
 with PDF documents 
 (creating, signing etc.). We have a problem with
 both licenses of your 
 library (MPL and LGPL). Is it possible to get
 commerce license of your 
 library?
 We don't need any type of support, we need to use
 your library for one 
 project for one customer.
 You will be very kind if you send me an answer and
 the price of commerce 
 license if would be possible to get it.
 Thank you very much.
 
 Sincerely
 Marcel Janal
 Taxnet, s.r.o, Ostrava
 Czech Republic
 
 

-
 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
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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


RE: Re: [iText-questions] PDFReader doesn't Garbage Collect

2006-04-28 Thread Matt Benson
sourceforge anonymous CVS access has been unavailable
all month.  It may be back in a few more days... ?  :(

-Matt

--- Elvis Novas [EMAIL PROTECTED] wrote:

 Paulo,
  
 I have not been able to login to cvs following the
 instructions from
 http://www.lowagie.com/iText/cvs.html using wincvs
 or the command line. If you have any other way to
 get the update I will really appreciate it.
  
 Thanks again,
  
 Elvis Novas
 
 
 Subject: RE: Re: [iText-questions] PDFReader doesn't
 Garbage CollectFrom: [EMAIL PROTECTED]:
 [EMAIL PROTECTED]: Fri, 28
 Apr 2006 17:28:41 +0100
 
 
 
 I've located the problem and the fix is in the CVS.
 After using the pdf call PdfCopy.freeReader().
  
 Paulo
 
 
 
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 On Behalf Of Elvis NovasSent: Friday, April 28, 2006
 5:02 PMTo:
 [EMAIL PROTECTED]: RE:
 Re: [iText-questions] PDFReader doesn't Garbage
 Collect
 
 Then, something (that I cannot see through the
 OptimizeIt) is causing the PdfReader to not be
 released ( garbage collected) until the end of the
 process. Nevertheless, the PdfImportedPage object is
 being garbage collected every x number of instances.
  
 By the way, I downloaded the version 1.4 and tested
 it using PdfReader(RandomAccessFileOrArray) instead
 of PdfReader(String) and the application is not
 running out of memory but still the PdfReader is not
 being garbage collected but just when the process
 ends.
  
  
 HTH,
  
 Elvis Novas
 
 
 Subject: RE: Re: [iText-questions] PDFReader doesn't
 Garbage CollectFrom: [EMAIL PROTECTED]:
 [EMAIL PROTECTED]: Fri, 28
 Apr 2006 15:39:10 +0100
 
 
 PdfCopy only holds the reference to the last added
 PDF. In any case I'll do some testing to see if
 something is broken.
  
 Paulo
 
 
 
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 On Behalf Of Elvis NovasSent: Friday, April 28, 2006
 2:31 PMTo:
 [EMAIL PROTECTED]: RE:
 Re: [iText-questions] PDFReader doesn't Garbage
 Collect
 
 Actually, I am looping (not in the example) through
 a number of Pdf files (currentPdfFile) and after
 adding the Imported Page to the PdfCopy I am setting
 the pdfReader object to null (not in the example),
 so I am expecting this object to be garbage
 collected a any time during the process.
  
 Thanks for your help,
  
 Elvis Novas
 
  From: [EMAIL PROTECTED] To:
 itext-questions@lists.sourceforge.net Subject: Re:
 [iText-questions] PDFReader doesn't Garbage Collect
 Date: Thu, 27 Apr 2006 21:20:42 +0100  When did
 you expect PdfReader to be garbage collected? In
 your code it's  used up to end.  Paulo  -
 Original Message -  From:
 [EMAIL PROTECTED] To:
 itext-questions@lists.sourceforge.net Sent:
 Thursday, April 27, 2006 4:57 PM Subject:
 [iText-questions] PDFReader doesn't Garbage Collect
   Hi All,I'm generating a Book (PDF file)
 using Java. The book is made of several existent
 pdf files (mostly images) as pages and when this
 book reaches a significant amount of MBs I'm
 running out memory. Checking the process using
 OptimizeIt in JBuilder I'm noticing that PDFReader
 is not garbage collecting this object causing the
 application to hang because of the memory problem.
 If Increase the memory I'm able to finish the
 process but I don't think that should be the
 solution since we consider that what the JVM has
 now is good enough. By the way, the size of the
 last book (it varies based on different business
 needs) 96 MB.The following is the approach I
 taking (not actual code):  Document  mainDocument
 = new Document(PageSize.LETTER, 36, 36, 36, 36); 
 FileOutputStream  book = new
 FileOutputStream(outputFile);  PdfCopy  pdfCopy =
 new PdfCopy(mainDocument, book); 
 mainDocument.open();PdfReader
 pdfReader = new PdfReader(currentPdfFile); 
 here's where OptimizeIt is showing the memory leak.
  PdfImportedPage importedPage =
 pdfCopy.getImportedPage(pdfReader, 1);
  pdfCopy.addPage(importedPage);   
 mainDocument.close();  TIA,Elvis
 Novas  

---
 Using Tomcat but need to do more? Need to support
 web services, security? Get stuff done quickly with
 pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1
 based on Apache Geronimo

http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net

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


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo

[iText-questions] Fwd: Don't convert XmlToHtml

2006-01-03 Thread Matt Benson
The iText forum is the proper place for this question,
not private email.  Further, you will have to provide
a great deal more information as to what you expect to
happen that is not happening before I or anyone else
has any hope of helping you.

-Matt


--- sanjay khandelwal [EMAIL PROTECTED] wrote:

 Date: 2 Jan 2006 11:14:58 -
 From: sanjay khandelwal [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Don't convert XmlToHtml
 
 Dear Sir,
 
 I have a class files for converting XmlToHtml.
 but , there is a little bit a problem.
 class file rum sucessfully.
 and generate the HTML file .
 
 but content of the XML file doesn't transfer.
 
 How can i solve this problem.
 
 plzz give me the right remedy.
 
 Thanx  Regards
 
 Sanjay    
 
 
 sanjay khandelwal




__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PDF to PCL (or PDF to POSTSCRIPT)

2005-11-03 Thread Matt Benson
Google for ghostPcl.

--- Paulo Soares [EMAIL PROTECTED] wrote:

 No.
 
 - Original Message - 
 From: Monkey Punch [EMAIL PROTECTED]
 To: itext-questions@lists.sourceforge.net
 Sent: Wednesday, November 02, 2005 10:13 PM
 Subject: [iText-questions] PDF to PCL (or PDF to
 POSTSCRIPT)
 
 
 Hi,
 
 I'm looking into printing some pdf document via the
 java print service api.
 I know
 this api supports printing pdf directly, however our
 printers here do not
 support
 direct pdf printing. It only supports pcl and
 postscript printing. I was
 wondering
 if it was possible to convert a pdf via iText to any
 of the mentioned
 formats? All
 your help would be very appreciated.
 
 Thanks!
 Tim
 
 
 

---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's
 Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv
 or your very own
 Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net

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




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] FW: Request for U.S. Export Information -Lowagie Classes- iText.0 .92.jar

2005-04-19 Thread Matt Benson
Doesn't this presume (mostly incorrectly) that iText
is developed in the US?

-Matt

--- TRANS GET Software License Manager, (GE Trans)
[EMAIL PROTECTED] wrote:
 
  GE Transportation is in the process of reviewing
 your software product
  Lowagie Classes-iText.0.92.jar.
  In order to determine whether the software is
 subject to Federal Export
  Administration Regulations (EAR), we are
 requesting that you provide the
  Export Control Classification Number (ECCN)  that
 classifies this software
  according to the Commerce Control List.  This
 number is used to determine
  if an export license is required by the U.S.
 Department of Commerce in
  order for our company to export the software to
 our affiliates abroad
  and/or to provide access to our non-US citizen
 employees.
  
  We appreciate your cooperation in this matter.  If
 you do not have access
  to this information, please forward this request
 to the appropriate
  personnel in your company.  Please copy our email
 address on the request
  ([EMAIL PROTECTED]) so that we may
 follow up.  Typically this
  information is maintained in the legal department
 and/or organization
  responsible for regulatory procedures.
  
  For additional information regarding US Export, or
 for assistance in
  obtaining the ECCN for your product, you can
 contact the Bureau of
  Industry and Security (BIS) Office of Exporter
 Services at 202-482-4811 or
  their Western regional office at 949-660-0144 for
 assistance.  Additional
  information is also available on the Department of
 Commerce's website at
 
 http://www.bxa.doc.gov/licensing/exportingbasics.htm
  
  
  GE Transportation Software License Manager
  F  513-786-4461 
  E  [EMAIL PROTECTED]
  
  Sharon Garls 
  Michael Powell
 
 

---
 This SF.Net email is sponsored by: New Crystal
 Reports XI.
 Version 11 adds new functionality designed to reduce
 time involved in
 creating, integrating, and deploying reporting
 solutions. Free runtime info,
 new features, or free trial, at:
 http://www.businessobjects.com/devxi/728
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net

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



__ 
Do you Yahoo!? 
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide


---
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PDF to PCL

2004-11-17 Thread Matt Benson
--- Rémi Guilbert [EMAIL PROTECTED] wrote:

 Hi, do you know what can I do to convert pdf file to
 pcl file (on Unix) ?  I 
 need to use duplex functionnality.

Never forget ghostScript for tasks just such as this!

-Matt

 Thank's !!
 Rémi 




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 



---
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Future of iText

2004-09-08 Thread Matt Benson
Paulo is doing the most part of new development.  He
releases an itext-paulo version much more often than
Bruno releases an official iText version, but every
official iText version AFAIK rolls up the latest of
Paulo's work.

HTH,
Matt


--- Steve Appling [EMAIL PROTECTED] wrote:

 Could someone (Paulo or Bruno) comment on the
 expected future path of iText
 development.  I'm not clear about the intent of
 having the two different
 versions (itext.sourceforge.net and
 itextpdf.sourceforge.net).  Is it the
 intent for Paulo's experimental version to become
 the main version
 eventually?  Are bugfixes or new features pursued on
 both branches or is the
 one at itext.sourceforge.net frozen?  Who has commit
 rights for each of
 these source trees and how are bug fixes typically
 submitted?  I poked
 around both of these SourceForge sites and didn't
 seem much information on
 this.
 
 Thanks
 
 
 
 

---
 This SF.Net email is sponsored by BEA Weblogic
 Workshop
 FREE Java Enterprise J2EE developer tools!
 Get your free copy of BEA WebLogic Workshop 8.1
 today.

http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Any way to autosize column widths for tables

2004-07-23 Thread Matt Benson
What do you mean by manually? Relative widths work for
me.  You could subclass Table to do different things
but since iText already wraps Cell content I don't
expect any external algorithm to do much better than
what you'll get by using relative widths.  No
calculation, just--honestly--gut feel on the weight
of a column.  You can also customize split characters
by setting a custom SplitCharacter on your Chunk(s). 
You could also do this in a Table subclass (sometimes
this is easier when you want to automatically do
something to all your Chunks, for example).

-Matt

--- Alan Berezin [EMAIL PROTECTED] wrote:
 Is there anyway to get iText to reflow a Table by
 autosizing the columns widths.  Having to manually
 set
 the Cell widths is really a pain.
 
 
 
 
   
   
 __
 Do you Yahoo!?
 Vote for the stars of Yahoo!'s next ad campaign!

http://advision.webevents.yahoo.com/yahoo/votelifeengine/
 
 

---
 This SF.Net email is sponsored by BEA Weblogic
 Workshop
 FREE Java Enterprise J2EE developer tools!
 Get your free copy of BEA WebLogic Workshop 8.1
 today.

http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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





__
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721alloc_id=10040op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] help reading barcodes

2004-06-18 Thread Matt Benson
Check JPEDAL and/or PdfBox for that functionality.

-Matt

--- Frank Sharpless [EMAIL PROTECTED] wrote:
 Hello all,
 
  
 
 I am attempting to read bar codes from a PDF file. 
 However, my barcode
 reader software requires that the page to be read is
 a Java Image
 object.  Is there a way to extract a page from a PDF
 and convert it to
 an Image or BufferedImage object?
 
  
 
 Many Thanks in advance,
 
  
 
 Frank Sharpless
 
 Manager, Application Development
 
 Paperhost.com, Inc.
 
 770.998.9172.611
 
  
 
 




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Toastscript

2004-05-26 Thread Matt Benson
There's always ghostScript, which is great.  However I
seem to recall this conversation taking place on this
list before which ended with a member having a copy. 
Search the archives.

-Matt

--- Dipankar [EMAIL PROTECTED] wrote:
 Hi,
 I urgently need a tool to convert postscript to
 text. I know there was a tool called ToastScript but
 unfortunately it is dead.
 If anyone has a copy of Toastscript please share it
 with me.
 
 Dipankar.





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Fast Web View

2004-04-30 Thread Matt Benson
Check out Leonard's company at www.pdfsages.com . 
They have a product called PdfEnhancer that can do
this  more...

-Matt

--- = k3Rn = [EMAIL PROTECTED] wrote:
 Hello!
 
 A PDF File can have the option to be faster viewable
 on the web,
 does iText has a method to change / set this option?
 I think it might be similar to the methods for
 editing the metadata of
 a file.
 
 Thx in advance!
 Markus
 
 
 

---
 This SF.Net email is sponsored by: Oracle 10g
 Get certified on the hottest thing ever to hit the
 market... Oracle 10g. 
 Take an Oracle 10g class now, and we'll give you the
 exam FREE.

http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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





__
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Fast Web View

2004-04-30 Thread Matt Benson
--- = k3Rn = [EMAIL PROTECTED] wrote:
 That prodict is very expensive and i the question
 was if you
 can do that with iText.
 

I would have thought it obvious that the answer was NO
since I directed you to a commercial product, and I
can't say that I particularly care for your attitude
towards someone trying to help you in spite of the
fact that you are obviously too lazy to have searched
the archives for this answer.

 Do you guys know what option i mean? You can find
 them
 in document properties - fast web view (if i am
 right, you
 can speed up loading processes if you open such
 files from
 webpages).
 
The option is called PDF linearization or some variant
thereof and, once again, it is NOT possible with
iText.  I'm sure you're quite welcome to pick up the
PDF spec and implement it yourself, however.

-Matt




__
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] howto stop grayscale jpg lightening automat ically on output to pd f?

2004-03-24 Thread Matt Benson
--- Menke, John [EMAIL PROTECTED] wrote:
 Bill, thanks for getting back to me.  I have not
 used the Image constructor
 directly because i 
 need get my images as a stream and there does not
 appear to be a constructor
 that matches with
 inputStream.  

Instead of public constructors, Image provides a
number of static getInstance() methods including 1
that take data from a byte[].  Worst case, you should
be able to read your stream into a
ByteArrayOutputStream and construct the Image with the
result of toByteArray().

 
 the reason i get as stream is that i am pulling the
 image out of jar file:
 
 imageFileUrl = new URL(urlString);
 jarConnection = (JarURLConnection)
 imageFileUrl.openConnection();
 inputStream = jarConnection.getInputStream();
 

If you're using a URL, Image has getInstance(URL)...

-Matt

__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] streaming jpeg into PdfContentByte

2004-03-23 Thread Matt Benson
--- Menke, John [EMAIL PROTECTED] wrote:
 MY QUESTION IS THIS.  CAN I create a rendered image
 with a JPEGDecodeParam()
 instead of the TIFFDecodeParam and if so what do i
 use as params  for the
 JAI.create method.  I can't find a reference for
 valid operator names for
 the JAI.create method
 

iText has always supported (most) JPEGs directly via
the Image class.  Recent versions support TIFF as
well, eliminating the need for you to be able to use
the JAI.  As I understand it iText's TIFF support
performs well, so switching from JAI shouldn't create
a problem there either.  

-Matt


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] PDF/X-3 compliant attributes

2004-03-16 Thread Matt Benson
--- Paulo Soares [EMAIL PROTECTED] wrote:
 No member of the team said that there aren't plans
 to support PDF/X in the future. As you saw, iText

  Yes, and it bothered me when I saw that remark.  I
remember approximately the comments from which it was
derived, but I felt this last comment contained
inferences that weren't necessarily present at the
source.

  I see both list members who took part in that
discussion (we'll call them the incumbent and the
challenger) as valuable members of this community,
the incumbent being a wealth of PDF-specific
knowledge, and the challenger possessing what
appears to be a fairly rare perspective on PDF from
the user side.  Either one's departure would represent
a loss.  However, at the risk of starting a flame war,
of which I want or need no part, that comment looked
suspiciously like a complaint.  As with all OSS, any
user is welcome and encouraged to develop and
contribute functionality and while it's nice to ask
and receive, being in a position to help yourself is
no bad thing either.  A quick query of the list will
usually yield a pointer into the right approach and/or
starting point for any feature addition.

$0.02

-Matt

__
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PdfReader

2004-02-26 Thread Matt Benson
--- karl wettin [EMAIL PROTECTED] wrote:
 I just stubled over iText as I'm looking for way to
 extract the text
 elements of a PDF for storage in a text index
 (Apache Lucene).
 

iText is many things, but its emphasis is not in this
area.

 My goal is a subclassed PdfReader with a convenience
 method called
 enumerateTextElements, enumerateElements or so.
 

This is somewhat possible.  The list contains several
instances of Paulo explaining in general how to do it,
and also several of Leonard explaining why you'll
never be sure you got ALL the content.  ;)  Ultimately
the answer you're going to get is use PdfBox, JPEDAL
or Multivalent.

-Matt

__
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: FW: [iText-questions] HTML to PDF Question...

2004-02-18 Thread Matt Benson
--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 Hi Matt,
 
 I'm hoping you're still around :)
 
 We finally got rid of the oracle errors and we're
 using Xerces xml
 parser and JAXP (we sorted out that dodgy command
 line ;)).  
 
 I'm trying out the tutorial classes just to see if
 we get it right...
 
 However, when trying to run Chapter 7 Example 6

(http://www.lowagie.com/iText/examples/Chap0706.java)
 
 I get the following error... The code is a copy and
 paste, I haven't
 changed anything other than the location of the pdf
 file to be written
 and the location of the html file...
 
 Error(51,20): method parse(java.lang.String,
 com.lowagie.text.html.SAXmyHtmlHandler) not found in
 class
 javax.xml.parsers.SAXParser
 
 I'm just curious as to how you set up a project for
 iText and if I've
 missed something...
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 On Behalf Of Matt
 Benson
 Sent: Wednesday, 14 January 2004 3:33 AM
 To: Dunstall, Christopher
 Cc: itext-questions
 Subject: RE: FW: [iText-questions] HTML to PDF
 Question...
 
 
 keep the list copied!  :)
 

Regarding the above, in addition to the basic iText
jar, do you have the iText xml jar on your CLASSPATH
as you compile?  What version of the Java SDK are you
using?

-Matt

__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: FW: [iText-questions] HTML to PDF Question...

2004-02-18 Thread Matt Benson
What version of xerces?

-Matt

--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 Yes I have the iText xml jar file as well...
 
 We're using SDK 1.3.1.02
 
 ~~
 Chris Dunstall
 Analyst Programmer
  
 Admin Computing
 Bathurst Campus
 Charles Sturt University
  
 E-Mail:  [EMAIL PROTECTED]
 Phone:   +61 2 63384818
 Fax: +61 2 63384181
 Mobile:  +61 0438 324 180
 ~~
 
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, 19 February 2004 9:50 AM
 To: Dunstall, Christopher
 Cc: itext-questions
 Subject: RE: FW: [iText-questions] HTML to PDF
 Question...
 
 
 --- Dunstall, Christopher [EMAIL PROTECTED]
 wrote:
  Hi Matt,
  
  I'm hoping you're still around :)
  
  We finally got rid of the oracle errors and we're
  using Xerces xml
  parser and JAXP (we sorted out that dodgy command
  line ;)).
  
  I'm trying out the tutorial classes just to see if
  we get it right...
  
  However, when trying to run Chapter 7 Example 6
 

(http://www.lowagie.com/iText/examples/Chap0706.java)
  
  I get the following error... The code is a copy
 and
  paste, I haven't
  changed anything other than the location of the
 pdf
  file to be written
  and the location of the html file...
  
  Error(51,20): method parse(java.lang.String,
  com.lowagie.text.html.SAXmyHtmlHandler) not found
 in
  class
  javax.xml.parsers.SAXParser
  
  I'm just curious as to how you set up a project
 for
  iText and if I've
  missed something...
  
  -Original Message-
  From: [EMAIL PROTECTED]
 
 [mailto:[EMAIL PROTECTED]
  On Behalf Of Matt
  Benson
  Sent: Wednesday, 14 January 2004 3:33 AM
  To: Dunstall, Christopher
  Cc: itext-questions
  Subject: RE: FW: [iText-questions] HTML to PDF
  Question...
  
  
  keep the list copied!  :)
  
 
 Regarding the above, in addition to the basic
 iText
 jar, do you have the iText xml jar on your CLASSPATH
 as you compile?  What version of the Java SDK are
 you
 using?
 
 -Matt
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you want.
 http://antispam.yahoo.com/tools


__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools


---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Fwd: RE: FW: [iText-questions] HTML to PDF Question...

2004-02-18 Thread Matt Benson

Note: forwarded message attached.


__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools---BeginMessage---
I didn't know what version, I've downloaded the latest version of xerces
and it works! :)

Thanks for your help :)

~~
Chris Dunstall
Analyst Programmer
 
Admin Computing
Bathurst Campus
Charles Sturt University
 
E-Mail:  [EMAIL PROTECTED]
Phone:   +61 2 63384818
Fax: +61 2 63384181
Mobile:  +61 0438 324 180
~~


-Original Message-
From: Matt Benson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 19 February 2004 10:04 AM
To: Dunstall, Christopher
Cc: itext-questions
Subject: RE: FW: [iText-questions] HTML to PDF Question...


What version of xerces?

-Matt

--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 Yes I have the iText xml jar file as well...
 
 We're using SDK 1.3.1.02
 
 ~~
 Chris Dunstall
 Analyst Programmer
  
 Admin Computing
 Bathurst Campus
 Charles Sturt University
  
 E-Mail:  [EMAIL PROTECTED]
 Phone:   +61 2 63384818
 Fax: +61 2 63384181
 Mobile:  +61 0438 324 180 ~~
 
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 19 February 2004 9:50 AM
 To: Dunstall, Christopher
 Cc: itext-questions
 Subject: RE: FW: [iText-questions] HTML to PDF
 Question...
 
 
 --- Dunstall, Christopher [EMAIL PROTECTED]
 wrote:
  Hi Matt,
  
  I'm hoping you're still around :)
  
  We finally got rid of the oracle errors and we're
  using Xerces xml
  parser and JAXP (we sorted out that dodgy command
  line ;)).
  
  I'm trying out the tutorial classes just to see if
  we get it right...
  
  However, when trying to run Chapter 7 Example 6
 

(http://www.lowagie.com/iText/examples/Chap0706.java)
  
  I get the following error... The code is a copy
 and
  paste, I haven't
  changed anything other than the location of the
 pdf
  file to be written
  and the location of the html file...
  
  Error(51,20): method parse(java.lang.String,
  com.lowagie.text.html.SAXmyHtmlHandler) not found
 in
  class
  javax.xml.parsers.SAXParser
  
  I'm just curious as to how you set up a project
 for
  iText and if I've
  missed something...
  
  -Original Message-
  From: [EMAIL PROTECTED]
 
 [mailto:[EMAIL PROTECTED]
  On Behalf Of Matt
  Benson
  Sent: Wednesday, 14 January 2004 3:33 AM
  To: Dunstall, Christopher
  Cc: itext-questions
  Subject: RE: FW: [iText-questions] HTML to PDF
  Question...
  
  
  keep the list copied!  :)
  
 
 Regarding the above, in addition to the basic
 iText
 jar, do you have the iText xml jar on your CLASSPATH
 as you compile?  What version of the Java SDK are
 you
 using?
 
 -Matt
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you want. 
 http://antispam.yahoo.com/tools


__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools---End Message---


Re: [iText-questions] Sample Code: Export PDF to JPG

2004-01-14 Thread Matt Benson
gs -dNOPAUSE -sDEVICE=jpeg -sOutputFile=myfile.jpg
myfile.pdf

;)

-Matt

--- Scott Sprout [EMAIL PROTECTED] wrote:
 Does anyone have a good sample of code converting a
 pdf file to a jpg file?
 
 Thanks,
 
 Scott Sprout
 [EMAIL PROTECTED]
 

_
 Get a FREE online virus check for your PC here, from
 McAfee. 

http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
 
 
 

---
 This SF.net email is sponsored by: Perforce
 Software.
 Perforce is the Fast Software Configuration
 Management System offering
 advanced branching capabilities and atomic changes
 on 50+ platforms.
 Free Eval!
 http://www.perforce.com/perforce/loadprog.html
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: FW: [iText-questions] HTML to PDF Question...

2004-01-13 Thread Matt Benson
keep the list copied!  :)

Now, as to your last Exception, it just looks the like
xml jar wasn't on the classpath.  I would
double-check.  I ran your Class1 code with the
following test.html:

PSTRONGRelated course
structure/STRONGBRThe
quick brown fox
jumps overBRThe quick pink fish jumps over
the dolphin's
nose/P

and got an error about the BR tag; since the
HtmlParser is using an XML parser behind the scenes,
your HTML apparently needs to be X(well-formed)HTML.
When I changed to:

PSTRONGRelated course
structure/STRONGBR/The
quick brown fox
jumps overBR/The quick pink fish jumps over
the dolphin's
nose/P

I still got a bad PDF.  I added html and body tags
around the content and got a good PDF.  So apparently
the SAXmyHtmlHandler doesn't like HTML document
fragments.

-Matt


--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 Ok, I've got right back to basics and started a
 brand new project with
 nothing in my classpath, the latest version of itext
 and itext-xml
 
 I have all libraries set, and I run the example
 program from the
 tutorial...
 
 D:\jdev9031\jdk\bin\javaw.exe -ojvm -classpath D:\My

Projects\casims\iText\classes;D:\casims\lib;D:\jdev9031\jdev\lib\jdev-rt

.jar;D:\casims\lib\itext-1.01.jar;D:\casims\lib\sax.jar;D:\casims\lib\it
 ext-xml-1.01.jar mypackage4.Class1 
 Chapter 7 example 7: parsing the HTML from example 2
 
 java.lang.NoClassDefFoundError:
 com.lowagie.text.html.HtmlParser
 void mypackage4.Class1.main(java.lang.String[])   
 Class1.java:49 Exception in thread main
 Process exited with exit code 1.
 
 Mate, this has got me stumped... I don't exactly
 want to write my own
 HTML to pdf converter :P I've attached the class
 source, as you will see
 it's exactly the same as the tutorial...
 
 ~~
 Chris Dunstall
 Analyst Programmer
  
 Admin Computing
 Bathurst Campus
 Charles Sturt University
  
 E-Mail:  [EMAIL PROTECTED]
 Phone:   +61 2 63384818
 Fax: +61 2 63384181
 Mobile:  +61 0438 324 180
 ~~
 
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 13 January 2004 10:01 AM
 To: Dunstall, Christopher
 Cc: itext-questions
 Subject: RE: FW: [iText-questions] HTML to PDF
 Question...
 
 
 I would be suspicious of your CLASSPATH and anything
 else strange in your environment, including the
 little
 man in the hat behind you... just kidding about that
 last part.
 
 -Matt
 
 --- Dunstall, Christopher [EMAIL PROTECTED]
 wrote:
  I'm not even using an Oracle XML parser...
  
  That's what I don't get, I don't know how it's
  getting there.
  
  I even tried the example off the iText website and
  it also tries to use
  the oracle xml parser...
  
  ~~
  Chris Dunstall
  Analyst Programmer
   
  Admin Computing
  Bathurst Campus
  Charles Sturt University
   
  E-Mail:  [EMAIL PROTECTED]
  Phone:   +61 2 63384818
  Fax: +61 2 63384181
  Mobile:  +61 0438 324 180
 ~~
  
  
  -Original Message-
  From: Matt Benson [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, 13 January 2004 9:31 AM
  To: Dunstall, Christopher
  Cc: itext-questions
  Subject: RE: FW: [iText-questions] HTML to PDF
  Question...
  
  
  The problem appears to be something in that Oracle
  XML
  parser you're using.  You might try using a
  different
  one just for verification, then take it up with
  Oracle?
  
  -Matt
  
  P.S. keep the list copied on stuff so everyone
  benefits from any discussions...
  
  --- Dunstall, Christopher [EMAIL PROTECTED]
  wrote:
   Yup, that's all I was trying to do...
   
   My code retrieves a field of HTML from a
  database...
   In production, it
   literally could be thousands of characters, but
  for
   the test purposes
   while I am writing it it's just this small piece
  of
   HTML...
   
   ~~
   Chris Dunstall
   Analyst Programmer

   Admin Computing
   Bathurst Campus
   Charles Sturt University

   E-Mail:  [EMAIL PROTECTED]
   Phone:   +61 2 63384818
   Fax: +61 2 63384181
   Mobile:  +61 0438 324 180
  ~~
   
   
   -Original Message-
   From: Matt Benson [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, 13 January 2004 9:25 AM
   To: Dunstall, Christopher
   Cc: itext-questions
   Subject: RE: FW: [iText-questions] HTML to PDF
   Question...
   
   
   That's it?  I figured that was just a
 fragment...
   
   -Matt
   
   
   --- Dunstall, Christopher
 [EMAIL PROTECTED]
   wrote:
It's in the error message, sorry if it wasn't
obvious...

PSTRONGRelated course
   structure/STRONGBRThe
quick brown fox
jumps overBRThe quick pink fish jumps over
 the dolphin's 
nose/P

~~
Chris Dunstall
Analyst Programmer
 
Admin Computing
Bathurst Campus
Charles Sturt University

RE: FW: [iText-questions] HTML to PDF Question...

2004-01-13 Thread Matt Benson
 How does that even work with that embedded,
 apparently non-quoted space
 in your -classpath argument?
 
--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 I use JDeveloper, so it runs it internally, not from
 a commandline as
 such...
 

guess I would try to cut out any middlemen when trying
to discover the source of interference.

__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: FW: [iText-questions] HTML to PDF Question...

2004-01-12 Thread Matt Benson
It might help if you gave us at least an approximation
of the full block of HTML that was being parsed.

-Matt

--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 Anyone? :) Pretty Please? ;)
  
 ~~
 Chris Dunstall
 Analyst Programmer
  
 Admin Computing
 Bathurst Campus
 Charles Sturt University
  
 E-Mail:  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
 Phone:   +61 2 63384818
 Fax: +61 2 63384181
 Mobile:  +61 0438 324 180
 ~~
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 On Behalf Of
 Dunstall, Christopher
 Sent: Monday, 12 January 2004 5:33 PM
 To: [EMAIL PROTECTED]
 Subject: [iText-questions] HTML to PDF Question...
 Importance: High
 
 
 Hi all, I'm in urgent need of help.
  
 I'm trying to write a PDF from information in a
 database.
  
 Two of the fields contain HTML, so when I call the
 HtmlParser it's like
 this:
  
 HtmlParser.parse( document, dataObject.getField1()
 );
  
 When I run it, I get the following exception:
  
 ExceptionConverter: java.net.MalformedURLException:
 no protocol:
 PSTRONGRelated course structure/STRONGBRThe
 quick brown fox
 jumps overBRThe quick pink fish jumps over the
 dolphin's nose/P
  void oracle.xml.parser.v2.XMLError.flushErrors1()
   XMLError.java:178
  void

oracle.xml.parser.v2.XMLReader.pushXMLReader(org.xml.sax.InputSource)
   XMLReader.java:211
  void

oracle.xml.parser.v2.XMLParser.parse(org.xml.sax.InputSource)
   XMLParser.java:146
  void

oracle.xml.jaxp.JXSAXParser.parse(org.xml.sax.InputSource,
 org.xml.sax.helpers.DefaultHandler)
   JXSAXParser.java:286
  void
 javax.xml.parsers.SAXParser.parse(java.lang.String,
 org.xml.sax.helpers.DefaultHandler)
  void

com.lowagie.text.html.HtmlParser.go(com.lowagie.text.DocListener,
 java.lang.String)
  void

com.lowagie.text.html.HtmlParser.parse(com.lowagie.text.DocListener,
 java.lang.String)
  
 Does anyone know what it means by no protocol?
  
 Thanks in advance.
  
 ~~
 Chris Dunstall
 Analyst Programmer
  
 Admin Computing
 Bathurst Campus
 Charles Sturt University
  
 E-Mail:  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
 Phone:   +61 2 63384818
 Fax: +61 2 63384181
 Mobile:  +61 0438 324 180
 ~~
  
 


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: FW: [iText-questions] HTML to PDF Question...

2004-01-12 Thread Matt Benson
That's it?  I figured that was just a fragment...

-Matt


--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 It's in the error message, sorry if it wasn't
 obvious...
 
 PSTRONGRelated course structure/STRONGBRThe
 quick brown fox
 jumps overBRThe quick pink fish jumps over the
 dolphin's nose/P
 
 ~~
 Chris Dunstall
 Analyst Programmer
  
 Admin Computing
 Bathurst Campus
 Charles Sturt University
  
 E-Mail:  [EMAIL PROTECTED]
 Phone:   +61 2 63384818
 Fax: +61 2 63384181
 Mobile:  +61 0438 324 180
 ~~
 
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 13 January 2004 9:22 AM
 To: Dunstall, Christopher;
 [EMAIL PROTECTED]
 Subject: Re: FW: [iText-questions] HTML to PDF
 Question...
 
 
 It might help if you gave us at least an
 approximation
 of the full block of HTML that was being parsed.
 
 -Matt
 
 --- Dunstall, Christopher [EMAIL PROTECTED]
 wrote:
  Anyone? :) Pretty Please? ;)
   
  ~~
  Chris Dunstall
  Analyst Programmer
   
  Admin Computing
  Bathurst Campus
  Charles Sturt University
   
  E-Mail:  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] 
  Phone:   +61 2 63384818
  Fax: +61 2 63384181
  Mobile:  +61 0438 324 180
 ~~
  -Original Message-
  From: [EMAIL PROTECTED]
 
 [mailto:[EMAIL PROTECTED]
  On Behalf Of
  Dunstall, Christopher
  Sent: Monday, 12 January 2004 5:33 PM
  To: [EMAIL PROTECTED]
  Subject: [iText-questions] HTML to PDF Question...
  Importance: High
  
  
  Hi all, I'm in urgent need of help.
   
  I'm trying to write a PDF from information in a
  database.
   
  Two of the fields contain HTML, so when I call the
  HtmlParser it's like
  this:
   
  HtmlParser.parse( document, dataObject.getField1()
  );
   
  When I run it, I get the following exception:
   
  ExceptionConverter:
 java.net.MalformedURLException:
  no protocol:
  PSTRONGRelated course
 structure/STRONGBRThe
  quick brown fox
  jumps overBRThe quick pink fish jumps over the
  dolphin's nose/P
   void oracle.xml.parser.v2.XMLError.flushErrors1()
XMLError.java:178
   void
 

oracle.xml.parser.v2.XMLReader.pushXMLReader(org.xml.sax.InputSource)
XMLReader.java:211
   void
 

oracle.xml.parser.v2.XMLParser.parse(org.xml.sax.InputSource)
XMLParser.java:146
   void
 

oracle.xml.jaxp.JXSAXParser.parse(org.xml.sax.InputSource,
  org.xml.sax.helpers.DefaultHandler)
JXSAXParser.java:286
   void
 
 javax.xml.parsers.SAXParser.parse(java.lang.String,
  org.xml.sax.helpers.DefaultHandler)
   void
 

com.lowagie.text.html.HtmlParser.go(com.lowagie.text.DocListener,
  java.lang.String)
   void
 

com.lowagie.text.html.HtmlParser.parse(com.lowagie.text.DocListener,
  java.lang.String)
   
  Does anyone know what it means by no protocol?
   
  Thanks in advance.
   
  ~~
  Chris Dunstall
  Analyst Programmer
   
  Admin Computing
  Bathurst Campus
  Charles Sturt University
   
  E-Mail:  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] 
  Phone:   +61 2 63384818
  Fax: +61 2 63384181
  Mobile:  +61 0438 324 180
 ~~
   
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Hotjobs: Enter the Signing Bonus
 Sweepstakes
 http://hotjobs.sweepstakes.yahoo.com/signingbonus


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: FW: [iText-questions] HTML to PDF Question...

2004-01-12 Thread Matt Benson
The problem appears to be something in that Oracle XML
parser you're using.  You might try using a different
one just for verification, then take it up with
Oracle?

-Matt

P.S. keep the list copied on stuff so everyone
benefits from any discussions...

--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 Yup, that's all I was trying to do...
 
 My code retrieves a field of HTML from a database...
 In production, it
 literally could be thousands of characters, but for
 the test purposes
 while I am writing it it's just this small piece of
 HTML...
 
 ~~
 Chris Dunstall
 Analyst Programmer
  
 Admin Computing
 Bathurst Campus
 Charles Sturt University
  
 E-Mail:  [EMAIL PROTECTED]
 Phone:   +61 2 63384818
 Fax: +61 2 63384181
 Mobile:  +61 0438 324 180
 ~~
 
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 13 January 2004 9:25 AM
 To: Dunstall, Christopher
 Cc: itext-questions
 Subject: RE: FW: [iText-questions] HTML to PDF
 Question...
 
 
 That's it?  I figured that was just a fragment...
 
 -Matt
 
 
 --- Dunstall, Christopher [EMAIL PROTECTED]
 wrote:
  It's in the error message, sorry if it wasn't
  obvious...
  
  PSTRONGRelated course
 structure/STRONGBRThe
  quick brown fox
  jumps overBRThe quick pink fish jumps over the
  dolphin's nose/P
  
  ~~
  Chris Dunstall
  Analyst Programmer
   
  Admin Computing
  Bathurst Campus
  Charles Sturt University
   
  E-Mail:  [EMAIL PROTECTED]
  Phone:   +61 2 63384818
  Fax: +61 2 63384181
  Mobile:  +61 0438 324 180
 ~~
  
  
  -Original Message-
  From: Matt Benson [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, 13 January 2004 9:22 AM
  To: Dunstall, Christopher;
  [EMAIL PROTECTED]
  Subject: Re: FW: [iText-questions] HTML to PDF
  Question...
  
  
  It might help if you gave us at least an
  approximation
  of the full block of HTML that was being parsed.
  
  -Matt
  
  --- Dunstall, Christopher [EMAIL PROTECTED]
  wrote:
   Anyone? :) Pretty Please? ;)

   ~~
   Chris Dunstall
   Analyst Programmer

   Admin Computing
   Bathurst Campus
   Charles Sturt University

   E-Mail:  [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] 
   Phone:   +61 2 63384818
   Fax: +61 2 63384181
   Mobile:  +61 0438 324 180
  ~~
   -Original Message-
   From:
 [EMAIL PROTECTED]
  
 
 [mailto:[EMAIL PROTECTED]
   On Behalf Of
   Dunstall, Christopher
   Sent: Monday, 12 January 2004 5:33 PM
   To: [EMAIL PROTECTED]
   Subject: [iText-questions] HTML to PDF
 Question...
   Importance: High
   
   
   Hi all, I'm in urgent need of help.

   I'm trying to write a PDF from information in a
   database.

   Two of the fields contain HTML, so when I call
 the HtmlParser it's 
   like
   this:

   HtmlParser.parse( document,
 dataObject.getField1()
   );

   When I run it, I get the following exception:

   ExceptionConverter:
  java.net.MalformedURLException:
   no protocol:
   PSTRONGRelated course
  structure/STRONGBRThe
   quick brown fox
   jumps overBRThe quick pink fish jumps over the
   dolphin's nose/P
void
 oracle.xml.parser.v2.XMLError.flushErrors1()
 XMLError.java:178
void
  
 

oracle.xml.parser.v2.XMLReader.pushXMLReader(org.xml.sax.InputSource)
 XMLReader.java:211
void
  
 

oracle.xml.parser.v2.XMLParser.parse(org.xml.sax.InputSource)
 XMLParser.java:146
void
  
 

oracle.xml.jaxp.JXSAXParser.parse(org.xml.sax.InputSource,
   org.xml.sax.helpers.DefaultHandler)
 JXSAXParser.java:286
void
  
 
 javax.xml.parsers.SAXParser.parse(java.lang.String,
   org.xml.sax.helpers.DefaultHandler)
void
  
 

com.lowagie.text.html.HtmlParser.go(com.lowagie.text.DocListener,
   java.lang.String)
void
  
 

com.lowagie.text.html.HtmlParser.parse(com.lowagie.text.DocListener,
   java.lang.String)

   Does anyone know what it means by no protocol?

   Thanks in advance.

   ~~
   Chris Dunstall
   Analyst Programmer

   Admin Computing
   Bathurst Campus
   Charles Sturt University

   E-Mail:  [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED] 
   Phone:   +61 2 63384818
   Fax: +61 2 63384181
   Mobile:  +61 0438 324 180
  ~~

   
  
  
  __
  Do you Yahoo!?
  Yahoo! Hotjobs: Enter the Signing Bonus
  Sweepstakes
  http://hotjobs.sweepstakes.yahoo.com/signingbonus
 
 
 __
 
=== message truncated ===


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored

RE: FW: [iText-questions] HTML to PDF Question...

2004-01-12 Thread Matt Benson
I would be suspicious of your CLASSPATH and anything
else strange in your environment, including the little
man in the hat behind you... just kidding about that
last part.

-Matt

--- Dunstall, Christopher [EMAIL PROTECTED]
wrote:
 I'm not even using an Oracle XML parser...
 
 That's what I don't get, I don't know how it's
 getting there.
 
 I even tried the example off the iText website and
 it also tries to use
 the oracle xml parser...
 
 ~~
 Chris Dunstall
 Analyst Programmer
  
 Admin Computing
 Bathurst Campus
 Charles Sturt University
  
 E-Mail:  [EMAIL PROTECTED]
 Phone:   +61 2 63384818
 Fax: +61 2 63384181
 Mobile:  +61 0438 324 180
 ~~
 
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 13 January 2004 9:31 AM
 To: Dunstall, Christopher
 Cc: itext-questions
 Subject: RE: FW: [iText-questions] HTML to PDF
 Question...
 
 
 The problem appears to be something in that Oracle
 XML
 parser you're using.  You might try using a
 different
 one just for verification, then take it up with
 Oracle?
 
 -Matt
 
 P.S. keep the list copied on stuff so everyone
 benefits from any discussions...
 
 --- Dunstall, Christopher [EMAIL PROTECTED]
 wrote:
  Yup, that's all I was trying to do...
  
  My code retrieves a field of HTML from a
 database...
  In production, it
  literally could be thousands of characters, but
 for
  the test purposes
  while I am writing it it's just this small piece
 of
  HTML...
  
  ~~
  Chris Dunstall
  Analyst Programmer
   
  Admin Computing
  Bathurst Campus
  Charles Sturt University
   
  E-Mail:  [EMAIL PROTECTED]
  Phone:   +61 2 63384818
  Fax: +61 2 63384181
  Mobile:  +61 0438 324 180
 ~~
  
  
  -Original Message-
  From: Matt Benson [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, 13 January 2004 9:25 AM
  To: Dunstall, Christopher
  Cc: itext-questions
  Subject: RE: FW: [iText-questions] HTML to PDF
  Question...
  
  
  That's it?  I figured that was just a fragment...
  
  -Matt
  
  
  --- Dunstall, Christopher [EMAIL PROTECTED]
  wrote:
   It's in the error message, sorry if it wasn't
   obvious...
   
   PSTRONGRelated course
  structure/STRONGBRThe
   quick brown fox
   jumps overBRThe quick pink fish jumps over the
   dolphin's nose/P
   
   ~~
   Chris Dunstall
   Analyst Programmer

   Admin Computing
   Bathurst Campus
   Charles Sturt University

   E-Mail:  [EMAIL PROTECTED]
   Phone:   +61 2 63384818
   Fax: +61 2 63384181
   Mobile:  +61 0438 324 180
  ~~
   
   
   -Original Message-
   From: Matt Benson [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, 13 January 2004 9:22 AM
   To: Dunstall, Christopher;
 [EMAIL PROTECTED]
   Subject: Re: FW: [iText-questions] HTML to PDF
   Question...
   
   
   It might help if you gave us at least an
   approximation
   of the full block of HTML that was being parsed.
   
   -Matt
   
   --- Dunstall, Christopher
 [EMAIL PROTECTED]
   wrote:
Anyone? :) Pretty Please? ;)
 
~~
Chris Dunstall
Analyst Programmer
 
Admin Computing
Bathurst Campus
Charles Sturt University
 
E-Mail:  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
Phone:   +61 2 63384818
Fax: +61 2 63384181
Mobile:  +61 0438 324 180
   ~~
-Original Message-
From:
  [EMAIL PROTECTED]
   
  
 
 [mailto:[EMAIL PROTECTED]
On Behalf Of
Dunstall, Christopher
Sent: Monday, 12 January 2004 5:33 PM
To: [EMAIL PROTECTED]
Subject: [iText-questions] HTML to PDF
  Question...
Importance: High


Hi all, I'm in urgent need of help.
 
I'm trying to write a PDF from information in
 a
database.
 
Two of the fields contain HTML, so when I call
  the HtmlParser it's
like
this:
 
HtmlParser.parse( document,
  dataObject.getField1()
);
 
When I run it, I get the following exception:
 
ExceptionConverter:
   java.net.MalformedURLException:
no protocol:
PSTRONGRelated course
   structure/STRONGBRThe
quick brown fox
jumps overBRThe quick pink fish jumps over
 the dolphin's 
nose/P  void
  oracle.xml.parser.v2.XMLError.flushErrors1()
  XMLError.java:178
 void
   
  
 

oracle.xml.parser.v2.XMLReader.pushXMLReader(org.xml.sax.InputSource)
  XMLReader.java:211
 void
   
  
 
=== message truncated ===


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration

Re: [iText-questions] iText with Rich Design

2004-01-09 Thread Matt Benson
See the Advanced iText portions of the tutorial, as
well as the rest of it, really... :)

some important classes for colors  images: 
PdfContentByte, PdfTemplate, Image, etc...

some important classes for formatting: 
PdfContentByte, ColumnText, Table, PdfPTable...

-Matt

--- Spectrum WebDesign [EMAIL PROTECTED] wrote:
 Hi
 
 i'm a ColdFusion Developer (iTexT newbie user). How
 to build rich files with images colors and text
 formatting?
 
 Do you have any tips, guides or tutorial?
 
 Thanx in advance
 -- 
 ___
 Get your free email from http://www.mail.com
 
 
 

---
 This SF.net email is sponsored by: Perforce
 Software.
 Perforce is the Fast Software Configuration
 Management System offering
 advanced branching capabilities and atomic changes
 on 50+ platforms.
 Free Eval!
 http://www.perforce.com/perforce/loadprog.html
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] pdf print?!?

2004-01-09 Thread Matt Benson
But you just want it to print to the user's default
(Windows) printer?  You could do it, for example, if
you sent the printer path to the servlet, assuming the
servlet runs on Windows OR you have already set up
your Unix server to be able to print to each of
however many Windows printers may be candidates for
this.  This discussion could get really long though so
I'll leave it at that for now.

-Matt

--- Wendy Smoak [EMAIL PROTECTED] wrote:
 RE: [iText-questions] pdf print?!?From: Paulo Soares
  See
 http://www.lowagie.com/iText/faq.html#printing.
  You can also use ghostscript.
 
 But the OP wants to print it one time with a java
 servlet.  The code above
 will lead to a pile of paper in the server room,
 while I suspect that the OP
 wants it to print on the client side when someone
 visits a URL that's mapped
 to his Servlet.
 
 I've used JavaScript to pop up a printer dialog on a
 web page, but AFAIK you
 can't [easily, without annoying users,] force
 anything to print from a
 Servlet.
 
 -- 
 Wendy Smoak
 
 
 

---
 This SF.net email is sponsored by: Perforce
 Software.
 Perforce is the Fast Software Configuration
 Management System offering
 advanced branching capabilities and atomic changes
 on 50+ platforms.
 Free Eval!
 http://www.perforce.com/perforce/loadprog.html
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] pdf print?!?

2004-01-09 Thread Matt Benson
As has been beaten to death on this forum, once you
serve the PDF to a user, due to the nature of PDF, you
can't control things like whether they copy it or
print it.  You will have to be satisfied with a
summary of the PDF or something similar on the client
side if you want to stop the user from doing something
with it...

-Matt

--- [EMAIL PROTECTED] wrote:
 :) yes, the document shoult printed at the webusers
 printer!
 
 my problem is, that i need a solution to serve
 existing pdf files to
 webusers. the webuser is allowed to print the pdf
 file only one time!!! i
 want a small servlet that open a pdf-file in the
 background and shows only a
 button (Now Print or somethink else). i cant use
 the command.exe every
 user installed the acrobat an another place... so i
 need another solution.
 im not good in java (i like perl,assembler,...and so
 on).
 
 can anybody help me,... is the javaservlet solution
 possible?
 
 okay, sure javascript, but the user can change the
 printouts from one to
 whatever,. but any user are allowed only one
 printout!
 
 thanks
 
 jonas
 
 - Original Message - 
 From: Matt Benson [EMAIL PROTECTED]
 To: Wendy Smoak [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Friday, January 09, 2004 4:29 PM
 Subject: Re: [iText-questions] pdf print?!?
 
 
  But you just want it to print to the user's
 default
  (Windows) printer?  You could do it, for example,
 if
  you sent the printer path to the servlet, assuming
 the
  servlet runs on Windows OR you have already set up
  your Unix server to be able to print to each of
  however many Windows printers may be candidates
 for
  this.  This discussion could get really long
 though so
  I'll leave it at that for now.
 
  -Matt
 
  --- Wendy Smoak [EMAIL PROTECTED] wrote:
   RE: [iText-questions] pdf print?!?From: Paulo
 Soares
See
   http://www.lowagie.com/iText/faq.html#printing.
You can also use ghostscript.
  
   But the OP wants to print it one time with a
 java
   servlet.  The code above
   will lead to a pile of paper in the server room,
   while I suspect that the OP
   wants it to print on the client side when
 someone
   visits a URL that's mapped
   to his Servlet.
  
   I've used JavaScript to pop up a printer dialog
 on a
   web page, but AFAIK you
   can't [easily, without annoying users,] force
   anything to print from a
   Servlet.
  
   -- 
   Wendy Smoak
  
  
  
  
 

---
   This SF.net email is sponsored by: Perforce
   Software.
   Perforce is the Fast Software Configuration
   Management System offering
   advanced branching capabilities and atomic
 changes
   on 50+ platforms.
   Free Eval!
   http://www.perforce.com/perforce/loadprog.html
   ___
   iText-questions mailing list
   [EMAIL PROTECTED]
  
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 
  __
  Do you Yahoo!?
  Yahoo! Hotjobs: Enter the Signing Bonus
 Sweepstakes
  http://hotjobs.sweepstakes.yahoo.com/signingbonus
 
 
 

---
  This SF.net email is sponsored by: Perforce
 Software.
  Perforce is the Fast Software Configuration
 Management System offering
  advanced branching capabilities and atomic changes
 on 50+ platforms.
  Free Eval!
 http://www.perforce.com/perforce/loadprog.html
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

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

---
 This SF.net email is sponsored by: Perforce
 Software.
 Perforce is the Fast Software Configuration
 Management System offering
 advanced branching capabilities and atomic changes
 on 50+ platforms.
 Free Eval!
 http://www.perforce.com/perforce/loadprog.html
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] pdf print?!?

2004-01-09 Thread Matt Benson
Then you don't have any problem.  When you said in
the background I thought you meant you wanted the
user to see the PDF.  Otherwise you just have to
figure out:

a) how to tell the servlet where to print the PDF, and
b) how to print the PDF from any Java process.

-Matt


--- [EMAIL PROTECTED] wrote:
 sure, but i dont wont to transfer any pdf directly
 to the user.
 i want to print the pdf (stored on the server) over
 the browser
 (javaservlet) directly to the users printer, if he
 push a print button at
 the servlet... :)
 
 
 - Original Message - 
 From: Matt Benson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Friday, January 09, 2004 5:54 PM
 Subject: Re: [iText-questions] pdf print?!?
 
 
  As has been beaten to death on this forum, once
 you
  serve the PDF to a user, due to the nature of PDF,
 you
  can't control things like whether they copy it or
  print it.  You will have to be satisfied with a
  summary of the PDF or something similar on the
 client
  side if you want to stop the user from doing
 something
  with it...
 
  -Matt
 
  --- [EMAIL PROTECTED] wrote:
   :) yes, the document shoult printed at the
 webusers
   printer!
  
   my problem is, that i need a solution to serve
   existing pdf files to
   webusers. the webuser is allowed to print the
 pdf
   file only one time!!! i
   want a small servlet that open a pdf-file in the
   background and shows only a
   button (Now Print or somethink else). i cant
 use
   the command.exe every
   user installed the acrobat an another place...
 so i
   need another solution.
   im not good in java (i like
 perl,assembler,...and so
   on).
  
   can anybody help me,... is the javaservlet
 solution
   possible?
  
   okay, sure javascript, but the user can change
 the
   printouts from one to
   whatever,. but any user are allowed only one
   printout!
  
   thanks
  
   jonas
  
   - Original Message - 
   From: Matt Benson [EMAIL PROTECTED]
   To: Wendy Smoak [EMAIL PROTECTED];
   [EMAIL PROTECTED]
   Sent: Friday, January 09, 2004 4:29 PM
   Subject: Re: [iText-questions] pdf print?!?
  
  
But you just want it to print to the user's
   default
(Windows) printer?  You could do it, for
 example,
   if
you sent the printer path to the servlet,
 assuming
   the
servlet runs on Windows OR you have already
 set up
your Unix server to be able to print to each
 of
however many Windows printers may be
 candidates
   for
this.  This discussion could get really long
   though so
I'll leave it at that for now.
   
-Matt
   
--- Wendy Smoak [EMAIL PROTECTED] wrote:
 RE: [iText-questions] pdf print?!?From:
 Paulo
   Soares
  See

 http://www.lowagie.com/iText/faq.html#printing.
  You can also use ghostscript.

 But the OP wants to print it one time with
 a
   java
 servlet.  The code above
 will lead to a pile of paper in the server
 room,
 while I suspect that the OP
 wants it to print on the client side when
   someone
 visits a URL that's mapped
 to his Servlet.

 I've used JavaScript to pop up a printer
 dialog
   on a
 web page, but AFAIK you
 can't [easily, without annoying users,]
 force
 anything to print from a
 Servlet.

 -- 
 Wendy Smoak




   
  
 

---
 This SF.net email is sponsored by: Perforce
 Software.
 Perforce is the Fast Software Configuration
 Management System offering
 advanced branching capabilities and atomic
   changes
 on 50+ platforms.
 Free Eval!

 http://www.perforce.com/perforce/loadprog.html

 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

   
  
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
   
   
__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus
   Sweepstakes
   
 http://hotjobs.sweepstakes.yahoo.com/signingbonus
   
   
   
  
 

---
This SF.net email is sponsored by: Perforce
   Software.
Perforce is the Fast Software Configuration
   Management System offering
advanced branching capabilities and atomic
 changes
   on 50+ platforms.
Free Eval!
   http://www.perforce.com/perforce/loadprog.html
   
 ___
iText-questions mailing list
[EMAIL PROTECTED]
   
  
 

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

---
   This SF.net email is sponsored by: Perforce
   Software.
   Perforce is the Fast Software Configuration
   Management System offering
   advanced branching capabilities and atomic
 changes
 
=== message truncated ===


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing

Re: [iText-questions] Help with page break

2004-01-07 Thread Matt Benson
I am assuming you are seeing the page break character,
whose ASCII value is 12.  You should be able to just
look for this character and call Document.newPage()
whenever it is encountered.

-Matt

--- Wendy Smoak [EMAIL PROTECTED] wrote:
 I am currently transforming a text file into a pdf
 with iText, and instead
 of a page break, I'm getting a small box with an x
 in it.  We used to use
 text2pdf at the unix prompt, and it was able to do
 the page breaks.  It's
 been too long, but I *think* we had to insert some
 character to convince
 text2pdf to page break.  I'm still looking through
 the source code that
 creates the text file to see what it's doing.
 
 What character(s) would need to be present in a text
 file for iText to know
 to page break there?
 
 Thanks,
 Wendy Smoak
 
 
 

---
 This SF.net email is sponsored by: Perforce
 Software.
 Perforce is the Fast Software Configuration
 Management System offering
 advanced branching capabilities and atomic changes
 on 50+ platforms.
 Free Eval!
 http://www.perforce.com/perforce/loadprog.html
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Help with page break

2004-01-07 Thread Matt Benson
I have never had occasion to use String.split() but it
does look like it should work something like this:

String[] reportPage
 = String.split(read(filename), \x0c);

for (int i = 0;
 reportPage != null  i  reportPage.length ; i++)
{
  if (i  0) doc.newPage();
  doc.add(new Paragraph(new Phrase(11, reportPage[i],
   FontFactory.getFont(FontFactory.COURIER, 7.5f)));
}

-Matt

--- Wendy Smoak [EMAIL PROTECTED] wrote:
 From: Matt Benson [EMAIL PROTECTED]
  I am assuming you are seeing the page break
 character,
  whose ASCII value is 12.  You should be able to
 just
  look for this character and call
 Document.newPage()
  whenever it is encountered.
 
 Currently I'm not looking at the file at all.  The
 text lives in the
 database, and I stuff it into a Chunk like so:
 
 String filename = (String) req.getAttribute(
 filename );
 String report = read( filename ); //this reads the
 text from the database
 //7.5 point font
 Chunk chunk = new Chunk( report,
 FontFactory.getFont( FontFactory.COURIER,
 7.5f ) );
 //line spacing is too much, use Phrase not Paragraph
 //doc.add( new Paragraph( chunk ) );
 //# is the leading or line spacing
 Phrase phrase = new Phrase( 11, chunk );
 doc.add( new Paragraph( phrase ) );
 
 Do I need to parse the String containing the report
 text?  Could that be
 done with String.split()?  Or is there something I
 can embed in the text
 file that will tell iText to page break?
 
 Thanks,
 Wendy Smoak
 
 
 

---
 This SF.net email is sponsored by: Perforce
 Software.
 Perforce is the Fast Software Configuration
 Management System offering
 advanced branching capabilities and atomic changes
 on 50+ platforms.
 Free Eval!
 http://www.perforce.com/perforce/loadprog.html
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Question about adding images to existing PDF

2003-12-10 Thread Matt Benson
This can be done using the Barcode and PdfStamper
classes.  In general, you should probably:

-create a PdfReader to read your source PDF and obtain
its page count
-create a PdfStamper to write the stamped output
-create your Barcode subclass instance (eg Barcode39)
-get a PdfTemplate from your bar code's
getTemplateWithBarcode() method.  You may be able to
use the PdfContentByte returned from your PdfStamper's
getOverContent(1).
-for each page in the stamper:
call
stamper.getOverContent(pageNum).addTemplate(barcodeTemplate,
...translation matrix stuff...)

That's what I pieced together fairly quickly from the
API... Paulo may fill in some blanks later but that
may be enough for a start.

hth,
Matt

--- Verboom, Rob [EMAIL PROTECTED]
wrote:
 
 
 I have a quick question. I currently have a bunch of
 PDFs generated by an external process, I am
 wondering if it is possible to insert an image onto
 the pdf's using Itext. I already have a small
 program to concatenate multiple PDF files into a
 large PDF with bookmarks, but I have a requirement
 to add a barcode image to every page.
 
 First is this possible at all? Secondly could
 someone point me to a good starting spot to find out
 how it is done.
 
 Thanks in advance
 
 Rob Verboom 
 Senior Java Developer
 Cartier Partners Financial Group inc.  
 www.cartierpartners.ca
 (519) 488-2025 ext 7407
 
 
 

---
 This SF.net email is sponsored by: SF.net Giveback
 Program.
 Does SourceForge.net help you be more productive? 
 Does it
 help you create better code?  SHARE THE LOVE, and
 help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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



__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Font types question

2003-11-21 Thread Matt Benson
Any ideas on the most terse way to get from COURIER
BOLD UNDERLINE to a corresponding Font or BaseFont
instance?

Thanks,
Matt

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PDF Thumbnails

2003-11-20 Thread Matt Benson
You may want to try JPEDAL, perhaps in conjunction
with the awt or jai classes as you suggest.

-Matt

--- Scott Sprout [EMAIL PROTECTED] wrote:
 This was a misunderstanding -- i was referring to
 the use of iText libraries 
 with sun's libraries that perform graphics
 operations, such as the 
 Graphics2D classes, etc.  I am not aware of any sun
 libraries that deal with 
 pdf's.
 
 Just looking for the best way to get the graphics of
 the first page of a pdf 
 and make it into a thumbnail.  I need to do this for
 a project, and I need 
 to find out if i need to have the user perform this
 operation, or if I can 
 do this programmatically.
 
 Sorry for the misunderstanding -- english is my
 second language (java is my 
 first).
 
 Thanks,
 
 Scott
 
 
 From: Bruno [EMAIL PROTECTED]
 To: Scott Sprout [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: [iText-questions] PDF Thumbnails
 Date: Thu, 20 Nov 2003 14:26:08 +0100
 
 Quoting Scott Sprout [EMAIL PROTECTED]:
 
   sun's java libraries to get a thumbnail of a
 given pdf file page
 
 I'm not aware of these libraries by SUN.
 Could you give us an URL?
 br,
 Bruno
 

_
 online games and music with a high-speed Internet
 connection!  Prices start 
 at less than $1 a day average. 
 https://broadband.msn.com (Prices may vary 
 by service area.)
 
 
 

---
 This SF.net email is sponsored by: SF.net Giveback
 Program.
 Does SourceForge.net help you be more productive? 
 Does it
 help you create better code?  SHARE THE LOVE, and
 help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] PDF version and Fast Web View

2003-11-20 Thread Matt Benson
--- Paulo Soares [EMAIL PROTECTED] wrote:
 iText doesn't do linearising.

To plug Leonard's stuff, his PDF Enhancer product will
produce linearized PDF:  www.pdfsages.com

-Matt


__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] pls help me

2003-08-26 Thread Matt Benson
This is not recommended as JSP is not very well suited
to create binary output:

http://www.lowagie.com/iText/faq.html#jsp


--- Naveen Reddy Gudipally [EMAIL PROTECTED]
wrote:
 Hi,
 
 Iam able to generate a pdf using java.Now if i
 want to generate it using jsp then what to do.Pls
 help
 me.
 
 Thanks
 
 Naveen
 
 =
 G.Naveen Kumar
 Tel:+60-173908391
 Mail:[EMAIL PROTECTED]
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site
 design software
 http://sitebuilder.yahoo.com
 
 

---
 This SF.net email is sponsored by: VM Ware
 With VMware you can run multiple operating systems
 on a single machine.
 WITHOUT REBOOTING! Mix Linux / Windows / Novell
 virtual machines
 at the same time. Free trial click
 here:http://www.vmware.com/wl/offer/358/0
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Ascii to PDF converter

2003-08-14 Thread Matt Benson
This is a FAQ:

http://www.lowagie.com/iText/faq.html#preformattedtext

-Matt

--- Huttin Pierre [EMAIL PROTECTED] wrote:
 Hello,
 
 I want to make an ASCII to PDF converter. Before
 recreating the wheel, I'm
 searching if anyone has already made this, if yes
 and if it's possible,
 where can I find the sources?
 
 Thanks for your answer.   
 
 ---
 HUTTIN Pierre
 OMNIS ECM Services
 81 route de Luxembourg
 L-4391 PONTPIERRE
  
 tel : (+352) 29 14 11 1
 fax : (+352) 29 14 11 650
 url : http://www.ecm.lu
 
 

**
 This email and any files transmitted with it are
 confidential and
 intended solely for the use of the individual or
 entity to whom they
 are addressed. If you have received this email in
 error please notify 
 the security manager at [EMAIL PROTECTED]
 This footnote also confirms that this email message
 has been swept by
 the SOFITEC C.A.T.S. systems for the presence of
 computer viruses.
 
 For more information about C.A.T.S. please check
 http://www.sofitec.lu

**
 
 
 

---
 This SF.Net email sponsored by: Free pre-built
 ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are
 available now.
 Download today and enter to win an XBOX or Visual
 Studio .NET.

http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Any plans to support tif files for Image?

2003-07-31 Thread Matt Benson
I believe the reason it is not supported is because
TIFF is multipage, and so contains multiple images.

-Matt

--- David Thielen [EMAIL PROTECTED] wrote:
 thanks - dave


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Any plans to support tif files for Image?

2003-07-31 Thread Matt Benson
I was speaking to the fact that TIFF images are not
directly supported in the Image class.  You have to go
to the codec class and specify the page you want.

-Matt

--- Chris Farmer [EMAIL PROTECTED] wrote:
 
 Check out this message from Paulo from this list on
 7/22 describing the
 tiff support:
 
 paulo's message
 TIFF flavors supported:
 
 Compression - no compression, packbits, lzw,
 deflate, ccitt Photometric
 - bw, rgb, separated (cymk), indexed Bit depth - 1,
 2, 4, 8 iccprofile
 is used if present
 
 Not supported - planar images and extra sample
 (masks)
 
 Other images types:
 
 gif - full support
 bmp - full support
 png - full support
 jpg - rgb and cymk 8 bit and monochrome
 wmf - no bmp or patterns
 
 Best Regards,
 Paulo Soares
 /paulo's message
 
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 31, 2003 10:33 AM
 To: David Thielen; itext
 Subject: Re: [iText-questions] Any plans to support
 tif files for Image?
 
 I believe the reason it is not supported is because
 TIFF is multipage, and so contains multiple images.
 
 -Matt
 
 --- David Thielen [EMAIL PROTECTED] wrote:
  thanks - dave
 
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site
 design software
 http://sitebuilder.yahoo.com
 
 

---
 This SF.Net email sponsored by: Free pre-built
 ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are
 available now.
 Download today and enter to win an XBOX or Visual
 Studio .NET.

http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01
 /01
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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

---
 This SF.Net email sponsored by: Free pre-built
 ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are
 available now.
 Download today and enter to win an XBOX or Visual
 Studio .NET.

http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Any plans to support tif files for Image?

2003-07-31 Thread Matt Benson
JMagick sits on top of ImageMagick and seems to
provide a means of getting its Images into awt.  It is
a Java interface into non-Java software as opposed to
a pure-java package.

-Matt

--- David Thielen [EMAIL PROTECTED] wrote:
 Hi;
 
 That's really good news.
 
 BTW - is there a java api that can turn formats
 other than jpeg/gif/png into
 a java (not itext) Image? Or convert it to a png
 format?
 
 thanks - dave
 
 - Original Message - 
 From: Chris Farmer [EMAIL PROTECTED]
 To: itext [EMAIL PROTECTED]
 Sent: Thursday, July 31, 2003 12:11 PM
 Subject: RE: [iText-questions] Any plans to support
 tif files for Image?
 
 
 
 Check out this message from Paulo from this list on
 7/22 describing the
 tiff support:
 
 paulo's message
 TIFF flavors supported:
 
 Compression - no compression, packbits, lzw,
 deflate, ccitt Photometric
 - bw, rgb, separated (cymk), indexed Bit depth - 1,
 2, 4, 8 iccprofile
 is used if present
 
 Not supported - planar images and extra sample
 (masks)
 
 Other images types:
 
 gif - full support
 bmp - full support
 png - full support
 jpg - rgb and cymk 8 bit and monochrome
 wmf - no bmp or patterns
 
 Best Regards,
 Paulo Soares
 /paulo's message
 
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 31, 2003 10:33 AM
 To: David Thielen; itext
 Subject: Re: [iText-questions] Any plans to support
 tif files for Image?
 
 I believe the reason it is not supported is because
 TIFF is multipage, and so contains multiple images.
 
 -Matt
 
 --- David Thielen [EMAIL PROTECTED] wrote:
  thanks - dave
 
 
 __
 Do you Yahoo!?
 Yahoo! SiteBuilder - Free, easy-to-use web site
 design software
 http://sitebuilder.yahoo.com
 
 

---
 This SF.Net email sponsored by: Free pre-built
 ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are
 available now.
 Download today and enter to win an XBOX or Visual
 Studio .NET.

http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01
 /01
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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

---
 This SF.Net email sponsored by: Free pre-built
 ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are
 available now.
 Download today and enter to win an XBOX or Visual
 Studio .NET.

http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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

---
 This SF.Net email sponsored by: Free pre-built
 ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are
 available now.
 Download today and enter to win an XBOX or Visual
 Studio .NET.

http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Acro form in existing pdf

2003-07-24 Thread Matt Benson
What would be the difference between these two
approaches regarding the database data:

1) Add the data as precisely-positioned text.
2) Add precisely-positioned data fields and populate.

?

-Matt

--- Leonard Rosenthol [EMAIL PROTECTED] wrote:
 At 4:49 PM +0200 7/24/03, Martin Abrahamsson wrote:
 The task is to make a pdf with some standard text
 in it, and some dynamic
 bits (name, adress etc) from a database and then
 som fields where the user
 is supposed to add text after i've presented it on
 the screen. Then the user
 prints the pdf.
 
   OK...
 
 
 I have to take an existing pdf (a scanned form that
 already
 exists on paper) or build it myself (not so
 appealing) and then add the
 dynamic bits at fixed locations (no problem i
 think) and som acroformfields
 (i'm new to this with acroforms so i hope this i
 how it works) the users
 could insert som text in on the screen. Is this at
 all possible with itext??
 
   Yup - no problem.  You can load the existing PDF
 into the PDF 
 as the background and then place whatever other text
 and fields you 
 need on top...
 
 
 Leonard
 -- 

---
 Leonard Rosenthol   
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
  
 215-629-0789 (fax)
 
 

---
 This SF.Net email sponsored by: Free pre-built
 ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are
 available now.
 Download today and enter to win an XBOX or Visual
 Studio .NET.

http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Compare PDF documents

2003-07-20 Thread Matt Benson
Leonard had it.  I was talking about using a pure
image rendering of each PDF, then comparing those. 
Might work, might not.

-Matt

--- Leonard Rosenthol [EMAIL PROTECTED] wrote:
 At 7:52 PM +0200 7/19/03, Andreas Probst wrote:
 Thank you both Matt and Leonard for your replies.
 Unfortunately
 they don't really make me hope to find a solution.
 :-(
 
   The only solution involves a LOT of internal
 knowledge about 
 PDF and a LOT of time to develop such a tool.   My
 company did some 
 work for a client related to PDF comparing - it took
 us a good 3-4 
 months to develop a solution that worked reliably
 and we were 
 starting with all the necessary PDF processing tools
 and know how...
 
 
 Matt, I've already tried the approach with
 Ghostscript. I
 converted the PDF into Postscript and PCL.
 
   Wrong idea.
 
   I think Matt's idea was to just create a raster
 image JPEG, 
 TIFF, PNG) and then compare the raster output.  That
 will certainly 
 tell you some things - but again, it's far from
 perfect.
 
 
 I'd need to confirm that the print output is the
 same as before:
 i.e. text and structure.
 
   The only CORRECT way to do that is to do extremely
 low level 
 PDF analysis...
 
 
 
 Leonard
 -- 

---
 Leonard Rosenthol   
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
  
 215-629-0789 (fax)
 
 

---
 This SF.net email is sponsored by: VM Ware
 With VMware you can run multiple operating systems
 on a single machine.
 WITHOUT REBOOTING! Mix Linux / Windows / Novell
 virtual machines at the
 same time. Free trial click here:
 http://www.vmware.com/wl/offer/345/0
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Compare PDF documents

2003-07-18 Thread Matt Benson
I have just hit the Multivalent site for the first
time and it looks pretty good.  Are there any things
to be aware of?  How would you compare the three
packages, Leonard?

-Matt

--- Leonard Rosenthol [EMAIL PROTECTED] wrote:
 At 9:12 AM -0700 7/17/03, Matt Benson wrote:
 if you wanted to compare the text, you could use
 some
 form of text extraction from JPEDAL, PdfBox, or one
 more I can never think of...
 
   Multivalent.
 
 
 and compare the text, or
 generate checksums from text and compare those
 (works
 for me).
 
   Definitely need to make sure you are using the same
 program 
 to do the extraction ;).
 
 
 if you wanted to compare exact visual
 representation,
 you could use JPEDAL or ghostScript to convert the
 PDFs to images and compare those, or again,
 generated
 checksums.
 
 
   Yes, this would tell if there is a visual
 difference - though 
 not what it is.  HOWEVER, you have to be careful
 about this type of 
 comparison when using the tools you specified since
 JPEDAL always 
 converts (algorithmically) all colors to RGB and GS
 to either RGB or 
 CMYK (depending on the DEVICE).   As such, it is
 possible that colors 
 could be off due to rounding...
 
 
 LDR
 -- 

---
 Leonard Rosenthol   
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
  
 215-629-0789 (fax)
 
 

---
 This SF.net email is sponsored by: VM Ware
 With VMware you can run multiple operating systems
 on a single machine.
 WITHOUT REBOOTING! Mix Linux / Windows / Novell
 virtual machines at the
 same time. Free trial click here:
 http://www.vmware.com/wl/offer/345/0
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Compare PDF documents

2003-07-17 Thread Matt Benson
Depending on what you want to compare, you could have
some options...

if you wanted to compare the text, you could use some
form of text extraction from JPEDAL, PdfBox, or one
more I can never think of... and compare the text, or
generate checksums from text and compare those (works
for me).

if you wanted to compare exact visual representation,
you could use JPEDAL or ghostScript to convert the
PDFs to images and compare those, or again, generated
checksums.

-Matt

--- Leonard Rosenthol [EMAIL PROTECTED] wrote:
 At 9:47 PM +0200 7/16/03, Andreas Probst wrote:
 I'm developing an application which creates PDF
 files.
 
   OK.
 
 
 To  automatically test this application, I'd need
 to compare PDF
 documents, i.e. compare the current output of the
 app to once
 created and verified reference files.
 
   What would you compare?  Visible output? 
 Structure?  Both?
 
 
   Unfortunately two PDF  files seem to be never
 binary equal, even if 
 they look the same  on the screen or on paper.
 
   Correct.   PDF files are quite complex entities and
 it is 
 possible to have two files that are NOTHING alike in
 their file 
 format, but produce the same visible results.
 
 
 
 Is it possible to compare two files with iText?
 
   No.
 
   The only thing that attempts this is Adobe
 Acrobat...
 
 
 Leonard
 -- 

---
 Leonard Rosenthol   
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
  
 215-629-0789 (fax)
 
 

---
 This SF.net email is sponsored by: VM Ware
 With VMware you can run multiple operating systems
 on a single machine.
 WITHOUT REBOOTING! Mix Linux / Windows / Novell
 virtual machines at the
 same time. Free trial click here:
 http://www.vmware.com/wl/offer/345/0
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] creating a chart and saving it as PDF

2003-07-14 Thread Matt Benson
Look for JFreeChart.

-Matt

--- klute [EMAIL PROTECTED] wrote:
 Hi All
 i need to generate a basic bar chart and then add it
 to the PDF created with iText. I have not really
 seen
 any references to the ability to create charts in
 the
 docs for iText. Cna someone tell me if it is
 possible
 and/or give me some hints as to how this could be
 done?
 
 Originally i thought of creating a chart in Flash
 (my
 friend knows how to do it already), saving it as an
 image and then adding to my generated PDF. However,
 we
 need the chart to have a high resolution and nicely
 zoomable/scalable. i guess it would be possible to
 convert the resulting Flash chart into an SVG to
 achieve this effect. I wonder if this will do the
 trick. Any ideas?
 
 Thanks to all,
 James
 
 
   
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 

---
 This SF.Net email sponsored by: Parasoft
 Error proof Web apps, automate testing  more.
 Download  eval WebKing and get a free book.
 www.parasoft.com/bulletproofapps1
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing  more.
Download  eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Search in PDF

2003-07-14 Thread Matt Benson
JPEDAL - versatility
PdfBox - ease-of-use

-Matt

--- Ben Sinclair [EMAIL PROTECTED] wrote:
 Is it possible, using iText or possibly another
 library, to search for text 
 within PDF files?
 
 
 --
 Ben Sinclair
 [EMAIL PROTECTED] 
 
 
 

---
 This SF.Net email sponsored by: Parasoft
 Error proof Web apps, automate testing  more.
 Download  eval WebKing and get a free book.
 www.parasoft.com/bulletproofapps1
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing  more.
Download  eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Page size

2003-07-10 Thread Matt Benson
Have you tried it?  If your printer driver sends the
sizes your printer may be able to figure it out.  For
example, I think there is a better than 50% chance
that an HP-LaserJet could do it, assuming the physical
printer is set up to know what types of paper are in
it.

-Matt


--- Schmickel, Xan [EMAIL PROTECTED]
wrote:
 By the same token, is there a way to instruct the
 printer to select
 upper and lower tray for legal and letter size
 within one document?
 -Xan
 
 -Original Message-
 From: Leonard Rosenthol
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 10, 2003 8:18 AM
 To: Carmona Perez, David;
 [EMAIL PROTECTED]
 Subject: Re: [iText-questions] Page size
 
 
 At 12:41 PM +0200 7/10/03, Carmona Perez, David
 wrote:
 Does anyone know if the page size of a PDF file has
 to be the same 
 throughout the whole file?
 
   No it does not.  You can happily mix page sizes...
 
 
 Leonard
 -- 


 ---
 Leonard Rosenthol
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
  
 215-629-0789 (fax)
 
 

---
 This SF.Net email sponsored by: Parasoft
 Error proof Web apps, automate testing  more.
 Download  eval WebKing and get a free book.
 www.parasoft.com/bulletproofapps
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing  more.
Download  eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] OT: java pdf reader

2003-07-10 Thread Matt Benson
You may be able to use some stuff from JPEDAL, but I
think there are other solutions as well.

-Matt

--- Roberto Cipollini [EMAIL PROTECTED]
wrote:
 Hi. Sorry for thuis off topic email. I hope anyone
 would mind :P
 
 I'm searching for a java pdf reader to boundle with
 my classes instead of
 having the acrobat-reader-setup beside my files.
 any suggestion?
 thanks.,
 Roberto
 
 - sorry again for the off topic! -
 
 
 
 

---
 This SF.Net email sponsored by: Parasoft
 Error proof Web apps, automate testing  more.
 Download  eval WebKing and get a free book.
 www.parasoft.com/bulletproofapps
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing  more.
Download  eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Searching an existing PDF

2003-06-27 Thread Matt Benson
You want to use JPEDAL (power) or PdfBox
(ease-of-use).

-Matt

--- Lee W [EMAIL PROTECTED] wrote:
 Hi everyone,
 
 I have just come across itext and am really
 impressed.  However I have 
 read though the tutorial and still have what I hope
 is an easy question.
 
 Is it possible to do simple searches for text in an
 existing PDF?
 
 I am thinking of writing an Open-Source Document
 Storage system and 
 would like users to be able to search for content in
 the stored 
 documents, no editing is required. I have already
 come across the 
 Jakarta POI project for reading Word  Excel docs,
 but nothing for PDF 
 (until I found itext).
 
 Can you please reply to me directly as I have not
 subscribed to the list 
 yet. Thanks in advance for any advice offered.
 
 Lee
 
 
 

---
 This SF.Net email sponsored by: Free pre-built
 ASP.NET sites including
 Data Reports, E-commerce, Portals, and Forums are
 available now.
 Download today and enter to win an XBOX or Visual
 Studio .NET.

http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0016ave/direct;at.asp_061203_01/01
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Example of HTML please wait screen before PDF generation

2003-06-25 Thread Matt Benson
You're setting objects as session attributes, like a
Map of key-value pairs tied to the HTTP session.

-Matt

--- Kenny G. Dubuisson, Jr.
[EMAIL PROTECTED] wrote:
 Bruno:
 
 In the sample code you gave me, I don't understand
 what a couple of lines
 are doing.  The first one is:
   MyPdfGenerator generator = (MyPdfGenerator)
 session.getAttribute(PDF);
 I understand that it's creating a new generator
 object but I don't know what
 the getAttibute is for (the other line I don't get
 is the call to
 setAttribute).  I've tried looking up the methods in
 the javax.servlet
 package but I can't seem to find the JavaDocs on
 that package.  If you
 wouldn't mind explaining the use of the attibute I
 would very much
 appreciate it.
 Thanks,
 Kenny
 
 - Original Message -
 From: Kenny G. Dubuisson, Jr.
 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 25, 2003 11:09 AM
 Subject: [iText-questions] Example of HTML please
 wait screen before PDF
 generation
 
 
  Hello all.  I've been working on the capability of
 a please wait screen
  that will display while my PDF is being generated.
  I got some code from
  Bruno and I've been trying to make it work to no
 avail.  What the code is
  supposed to do is write to the output stream in
 HTML format the please
  wait screen and refresh every 3 seconds.  If when
 it refreshes the
 document
  is done, change the output stream to PDF and send
 the document.  I have it
  to the point that it seems to switch to PDF but
 never displays the
 document
  (which at this point is just a page with the word
 test on it).
 
  The code separated into two files: MyPdfGenerator
 and PleaseWait Servlet.
  I've included the two pieces of code below.  Any
 ideas/comments would be
  very much appreciated.  Once I get this working
 I'll post to the list for
  future reference.  Thanks,
  Kenny
 
  // MyPdfGeneration.java
  import java.io.*;
  import com.lowagie.text.*;
  import com.lowagie.text.pdf.*;
 
  public class MyPdfGenerator implements Runnable
  {
 public static final int NOT_STARTED = 0;
 public static final int BUSY = 1;
 public static final int FINISHED = 2;
 public static final int ABORTED = 3;
 
 private int status = NOT_STARTED;
 private int counter = 0;
 private static final int TOTAL = 1000;
 private ByteArrayOutputStream baos = new
 ByteArrayOutputStream();
 
 public void run()
 {
try
{
   status = BUSY;
   Document document = new
 Document(PageSize.LETTER, 0, 0, 0, 0);
   PdfWriter writer =
 PdfWriter.getInstance(document, baos);
   document.open();
   PdfContentByte cb =
 writer.getDirectContent();
 
   document.add(new Paragraph(test));
 
   document.close();
   status = FINISHED;
}
catch (DocumentException de)
{
   status = ABORTED;
}
 }
 
 public boolean isBusy()
 {
return status == BUSY;
 }
 
 public boolean isFinished()
 {
return status == FINISHED;
 }
 
 public boolean isAborted()
 {
return status == ABORTED;
 }
 
 public int getStatus()
 {
return status;
 }
 
 public int size()
 {
return baos.size();
 }
 
 public void writePdf(OutputStream out) throws
 IOException
 {
baos.writeTo(out);
out.flush();
baos.close();
 }
  }
 
  // PleaseWaitServlet.java
  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
 
  public class PleaseWaitServlet extends HttpServlet
  {
 protected void service(HttpServletRequest
 request,
HttpServletResponse response) throws
 ServletException, IOException
 {
HttpSession session =
 request.getSession(true);
MyPdfGenerator generator = (MyPdfGenerator)
  session.getAttribute(PDF);
if (generator == null)
{
   response.setHeader(Refresh, 3);
   generator = new MyPdfGenerator();
   Thread t = new Thread(generator);
   t.start();
   session.setAttribute(PDF, generator);
   doHtmlOutput(response, document
 generation was initialized... +
  please wait);
   return;
}
if (generator.isBusy())
{
   response.setHeader(Refresh, 3);
   doHtmlOutput(response, document
 generation is busy...);
   return;
}
if (generator.isFinished())
{
   doPdfOutput(response, generator);
   session.removeAttribute(PDF);
   return;
}
if (generator.isAborted())
{
   doHtmlOutput(response, document
 generation was aborted);
   session.removeAttribute(PDF);
   return;
}
 }
 
 protected void doHtmlOutput(HttpServletResponse
 response, String
 message)
throws IOException
 {
response.setContentType(Text/html);
PrintWriter out = 

Re: Re: [iText-questions] Newbie's prob

2003-06-24 Thread Matt Benson
See my previous response.

-Matt

--- Hubert Lingo [EMAIL PROTECTED] wrote:
 And by the way do not forget to set the content type
 !!! (application/pdf)
 
 Hubert
 
 From: Matt Benson [EMAIL PROTECTED]
 To: Uwe Kristmann [EMAIL PROTECTED]
 CC: itext-questions
 [EMAIL PROTECTED]
 Subject: Re: Re: [iText-questions] Newbie's prob
 Date: Mon, 23 Jun 2003 07:10:11 -0700 (PDT)
 
 Always keep the list on correspondences.  I would
 think the problem lies in your usage of the
 PdfContentByte, and not to pass the buck, but I'll
 bet
 Paulo knows.  :)
 
 -Matt
 
 
 --- Uwe Kristmann [EMAIL PROTECTED] wrote:
hi matt,
  
  it works,  i get the pdfstream  with the text
   HELLO StreamTest3!! (document.add)
  but not the text i tried to add with
   PdfContentbyte.
  both in MSIE 6.0.26
  and
  Mozilla/5.0 (Windows; U; Windows NT 5.1;
 de-DE;
   rv:1.0.2) Gecko/20021120 Netscape/7.01
  don't understand why
  thanks for the reply
  
  uwe
  
   Matt Benson [EMAIL PROTECTED] schrieb am
   20.06.03 19:02:15:
   
What happens when you invoke the servlet
 through
   the
browser?  Also, does it happen to work
 properly
   using
a different browser?
   
-Matt
   
--- Uwe Kristmann [EMAIL PROTECTED] wrote:

  hi,

first to say, i'm not a great java expert
 and
   new
 to itext .

I'm trying to write pdfcontent direct to
 the
 browser (MSIE 6.026) .
It works fine for document.add, but
 using
 PdfContentbyte has
no effect.
Writing to the servers filesystem and
   redirecting
 the generated file
to the client is ok, but i would prefer
 to
   write
 to a ByteArrayOutputStream.

has anyone an idea what's wrong with this
   code?

 thanks a lot

  uwe

   serverlog:
with PdfContentByte
[20/06/2003 19:43:44:290 GMT+02:00]
   StreamTest3:
 init
[20/06/2003 19:43:46:793 GMT+02:00]
   StreamTest3:
 BAOS.size()= 2074
[20/06/2003 19:43:46:893 GMT+02:00]
   StreamTest3:
 BAOS.size()= 2074
[20/06/2003 19:45:53:115 GMT+02:00]
   StreamTest3:
 destroy
without
[20/06/2003 19:45:53:165 GMT+02:00]
   StreamTest3:
 init
[20/06/2003 19:45:55:518 GMT+02:00]
   StreamTest3:
 BAOS.size()= 1916
[20/06/2003 19:45:55:619 GMT+02:00]
   StreamTest3:
 BAOS.size()= 1916

//package pdfservlet;

   
  


 import java.io.ByteArrayOutputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.net.URL;

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

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

   
  


 public class StreamTest3 extends HttpServlet
 {

   
  



  public void init(ServletConfig config)
 throws ServletException {
 super.init(config);
 }

   
  



  public void doGet
(
 HttpServletRequest req,
 HttpServletResponse res
)
throws
 ServletException,
 IOException
   { doPost(req,res); }

   
  



  public void doPost(HttpServletRequest
 request,
 HttpServletResponse response)
 throws IOException, ServletException {

Document document = new
 Document(PageSize.A4,
   50,
 50, 50, 50);
ByteArrayOutputStream baos = new
 ByteArrayOutputStream();
try {
 PdfWriter writer =
 PdfWriter.getInstance(document,baos);
 writer.getInstance(document,baos);
 document.open();
   /*
 PdfContentByte cb =
   writer.getDirectContent();

 cb.beginText();

 BaseFont bf =
 BaseFont.createFont(BaseFont.HELVETICA,
 BaseFont.CP1252, BaseFont.NOT_EMBEDDED);

 cb.setFontAndSize(bf, 12);
 String text = Sample text for
 alignment;
 // we show some text starting on
   some
 absolute position with a given alignment


 cb.showTextAligned(PdfContentByte.ALIGN_CENTER,
   text
 +  Center, 250, 700, 0);


 cb.showTextAligned(PdfContentByte.ALIGN_RIGHT,
   text
 +  Right, 250, 650, 0);

 
=== message truncated ===


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Re: Re: [iText-questions] Newbie's prob

2003-06-24 Thread Matt Benson
I didn't say that your suggestions were not useful.  I
agree that if you do not take these measures you will
have limited results returning PDF content from a
servlet; my point was that since the original querent
was seeing SOME results, he couldn't have missed all
those basic steps.

And what's with Mr. Matt Benson?

-Matt

--- Hubert Lingo [EMAIL PROTECTED] wrote:
 OK your right, I didn't stay on the list. But there
 is a configuration 
 problem with it. When someone replies, the address
 should automatically be 
 set to [EMAIL PROTECTED]. Why
 this is not the case, I 
 don't know. Enough said about it, this is not the
 purpose of this mailing 
 list.
 
 But where I don't agree with your Mr. Matt Benson
 for the third point. IT IS 
 MANDATORY to set the content type and many real
 browser WILL NOT DISPLAY 
 anything if it is not set.
 In the same way, try to deliver a 1kb (very small
 file) PDF file to any 
 browser with the Adobe Acrobat PDF plug-in (I doubt
 that any plugin will 
 work) and you will see that IT WON'T WORK, because
 the buffer is not full 
 enough to be sent to the client (aka IE, Mozilla,
 Safari or whatever).
 
 Hubert
 
 From: Matt Benson [EMAIL PROTECTED]
 To: Hubert Lingo [EMAIL PROTECTED]
 CC: itext-questions
 [EMAIL PROTECTED]
 Subject: Re: Re: [iText-questions] Newbie's prob
 Date: Tue, 24 Jun 2003 07:50:54 -0700 (PDT)
 
 That's wonderful, but
 
 1) You didn't stay on the list
 2) I'm not the one with the problem, and
 3) Since the original poster is seeing some
 content,
 I'm not sure that these servlet suggestions, though
 worth keeping in mind at all times, will help in
 this
 specific situation.
 
 best regards,
 Matt
 
 --- Hubert Lingo [EMAIL PROTECTED] wrote:
   When you write something with a servlet do not
   forget in some situations to
   either:
   - set the content length (with
   response.setContentLength(data.length);
   response.getOutputStream().write(data);) before
   writing. Probably your
   problem!
   - to flush the writer.
  
   Hubert
  
  
   From: Matt Benson [EMAIL PROTECTED]
   To: Uwe Kristmann [EMAIL PROTECTED]
   CC: itext-questions
   [EMAIL PROTECTED]
   Subject: Re: Re: [iText-questions] Newbie's
 prob
   Date: Mon, 23 Jun 2003 07:10:11 -0700 (PDT)
   
   Always keep the list on correspondences.  I
 would
   think the problem lies in your usage of the
   PdfContentByte, and not to pass the buck, but
 I'll
   bet
   Paulo knows.  :)
   
   -Matt
   
   
   --- Uwe Kristmann [EMAIL PROTECTED] wrote:
  hi matt,

it works,  i get the pdfstream  with the
 text
 HELLO StreamTest3!! (document.add)
but not the text i tried to add with
 PdfContentbyte.
both in MSIE 6.0.26
and
Mozilla/5.0 (Windows; U; Windows NT 5.1;
   de-DE;
 rv:1.0.2) Gecko/20021120 Netscape/7.01
don't understand why
thanks for the reply

uwe

 Matt Benson [EMAIL PROTECTED] schrieb
 am
 20.06.03 19:02:15:
 
  What happens when you invoke the servlet
   through
 the
  browser?  Also, does it happen to work
   properly
 using
  a different browser?
 
  -Matt
 
  --- Uwe Kristmann [EMAIL PROTECTED]
 wrote:
  
hi,
  
  first to say, i'm not a great java
 expert
   and
 new
   to itext .
  
  I'm trying to write pdfcontent direct
 to
   the
   browser (MSIE 6.026) .
  It works fine for document.add, but
   using
   PdfContentbyte has
  no effect.
  Writing to the servers filesystem and
 redirecting
   the generated file
  to the client is ok, but i would
 prefer
   to
 write
   to a ByteArrayOutputStream.
  
  has anyone an idea what's wrong with
 this
 code?
  
   thanks a lot
  
uwe
  
 serverlog:
  with PdfContentByte
  [20/06/2003 19:43:44:290 GMT+02:00]
 StreamTest3:
   init
  [20/06/2003 19:43:46:793 GMT+02:00]
 StreamTest3:
   BAOS.size()= 2074
  [20/06/2003 19:43:46:893 GMT+02:00]
 StreamTest3:
   BAOS.size()= 2074
  [20/06/2003 19:45:53:115 GMT+02:00]
 StreamTest3:
   destroy
  without
  [20/06/2003 19:45:53:165 GMT+02:00]
 StreamTest3:
   init
  [20/06/2003 19:45:55:518 GMT+02:00]
 StreamTest3:
   BAOS.size()= 1916
  [20/06/2003 19:45:55:619 GMT+02:00]
 StreamTest3:
   BAOS.size()= 1916
  
  //package pdfservlet;
  
 

  
 


   import java.io.ByteArrayOutputStream;
   import java.io.FileOutputStream;
   import java.io.IOException;
   import java.net.URL;
  
   import javax.servlet.http.*;
   import javax.servlet.*;
  
   import com.lowagie.text.*;
   import com.lowagie.text.pdf.BaseFont;
   import

RE: [iText-questions] reduce size of PDFs with huge fonts

2003-06-24 Thread Matt Benson
What about using gs to distill the pdf (pdf - ps -
pdf?  I had good results with that at one time...

-Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 This 150K are with TT fonts? If you need small
 document just use the
 built-in fonts.
 You'll need other tool, such as ghostscript, to
 convert the pdf to an image
 but I have my doubts about the size improvement.
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   [EMAIL PROTECTED]
  [SMTP:[EMAIL PROTECTED]
  Sent:   Tuesday, June 24, 2003 17:19
  To: [EMAIL PROTECTED]
  Subject:[iText-questions] reduce size of PDFs
 with huge fonts
  
  Hello,
  
  We are in context of PDF text documents sent to
 extranet with servlets.
  One
  constraint is to download VERY
  QUICKLY these documents. The problem is that text
 is written in huge fonts
  (150 K) and it takes too much
  time to download: 50 seconds (and the extranet
 users has not the font on
  their workstation installed).
  We would like something like 5 seconds.
  
  One solution would be to transform  in TIF the PDF
 Text with embedded huge
  fonts,  and wrap it in PDF Image.
  
  Here is my code, but rawData is null !
  
  My question would be how to transform PDF text
 pages that are read into
  images (RenderedImage for instance).
  
  
  
  PdfReader   reader = new
 PdfReader((String) fileName);
  
  PdfStamper stamper = new
 PdfStamper(reader,new
  FileOutputStream
  (docs/toto));
  
  
  PdfImportedPage page =
 stamper.getImportedPage(reader, 1);
  ImgTemplate pdfImage =
 (ImgTemplate)Image.getInstance(page);
  
  
byte[] rawData =
 pdfImage.rawData(); //
  = IS NULL !!!
  
  
  
ByteArrayInputStream bais = new
  ByteArrayInputStream(rawData);
  
ImageInputStream iis =
  ImageIO.createImageInputStream(bais);
BufferedImage bi =
 ImageIO.read(bais);
  
  
TIFFEncodeParam paramOut = new
 TIFFEncodeParam();
  
 

paramOut.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4);
  
ImageEncoder encoder =
 
 ImageCodec.createImageEncoder(tiff,
  outputStream,
  paramOut);
  
encoder.encode(bi);
  
  Perhaps are there better alternatives.
  Have you got any hints ?
  
  
  Best regards,
  
  Fabrice DUERMAEL
  
  
  
  
 

**
  L'integrite de ce message n'etant pas assuree sur
 Internet,
  BNP Paribas Assurance ne peut etre tenu
 responsable de son contenu.
  Si vous n'etes pas destinataire de ce message
 confidentiel,
  Merci de le detruire et d'avertir immediatement
 l'expediteur.
  
  The integrity of this message cannot be guaranteed
 on the
  Internet. BNP Paribas Assurance can not therefore
 be considered
  responsible 
  for the contents. 
  If you are not the intended recipient of this
 confidential message,
  then please delete it and notify immediately the
 sender.
  
 

**
  
  
  
 

---
  This SF.Net email is sponsored by: INetU
  Attention Web Developers  Consultants: Become An
 INetU Hosting Partner.
  Refer Dedicated Servers. We Manage Them. You Get
 10% Monthly Commission!
  INetU Dedicated Managed Hosting
 http://www.inetu.net/partner/index.php
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

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

---
 This SF.Net email is sponsored by: INetU
 Attention Web Developers  Consultants: Become An
 INetU Hosting Partner.
 Refer Dedicated Servers. We Manage Them. You Get 10%
 Monthly Commission!
 INetU Dedicated Managed Hosting
 http://www.inetu.net/partner/index.php
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] reduce size of PDFs with huge fonts

2003-06-24 Thread Matt Benson
Also, you might look into Leonard's PDF Enhancer: 
http://www.pdfsages.com

-Matt

--- Matt Benson [EMAIL PROTECTED] wrote:
 What about using gs to distill the pdf (pdf - ps -
 pdf?  I had good results with that at one time...
 
 -Matt
 
 --- Paulo Soares [EMAIL PROTECTED] wrote:
  This 150K are with TT fonts? If you need small
  document just use the
  built-in fonts.
  You'll need other tool, such as ghostscript, to
  convert the pdf to an image
  but I have my doubts about the size improvement.
  
  Best Regards,
  Paulo Soares
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [SMTP:[EMAIL PROTECTED]
   Sent: Tuesday, June 24, 2003 17:19
   To:   [EMAIL PROTECTED]
   Subject:  [iText-questions] reduce size of PDFs
  with huge fonts
   
   Hello,
   
   We are in context of PDF text documents sent to
  extranet with servlets.
   One
   constraint is to download VERY
   QUICKLY these documents. The problem is that
 text
  is written in huge fonts
   (150 K) and it takes too much
   time to download: 50 seconds (and the extranet
  users has not the font on
   their workstation installed).
   We would like something like 5 seconds.
   
   One solution would be to transform  in TIF the
 PDF
  Text with embedded huge
   fonts,  and wrap it in PDF Image.
   
   Here is my code, but rawData is null !
   
   My question would be how to transform PDF text
  pages that are read into
   images (RenderedImage for instance).
   
   
   
   PdfReader   reader = new
  PdfReader((String) fileName);
   
   PdfStamper stamper = new
  PdfStamper(reader,new
   FileOutputStream
   (docs/toto));
   
   
   PdfImportedPage page =
  stamper.getImportedPage(reader, 1);
   ImgTemplate pdfImage =
  (ImgTemplate)Image.getInstance(page);
   
   
 byte[] rawData =
  pdfImage.rawData(); //
   = IS NULL !!!
   
   
   
 ByteArrayInputStream bais =
 new
   ByteArrayInputStream(rawData);
   
 ImageInputStream iis =
   ImageIO.createImageInputStream(bais);
 BufferedImage bi =
  ImageIO.read(bais);
   
   
 TIFFEncodeParam paramOut = new
  TIFFEncodeParam();
   
  
 

paramOut.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4);
   
 ImageEncoder encoder =
  
  ImageCodec.createImageEncoder(tiff,
   outputStream,
   paramOut);
   
 encoder.encode(bi);
   
   Perhaps are there better alternatives.
   Have you got any hints ?
   
   
   Best regards,
   
   Fabrice DUERMAEL
   
   
   
   
  
 

**
   L'integrite de ce message n'etant pas assuree
 sur
  Internet,
   BNP Paribas Assurance ne peut etre tenu
  responsable de son contenu.
   Si vous n'etes pas destinataire de ce message
  confidentiel,
   Merci de le detruire et d'avertir immediatement
  l'expediteur.
   
   The integrity of this message cannot be
 guaranteed
  on the
   Internet. BNP Paribas Assurance can not
 therefore
  be considered
   responsible 
   for the contents. 
   If you are not the intended recipient of this
  confidential message,
   then please delete it and notify immediately the
  sender.
   
  
 

**
   
   
   
  
 

---
   This SF.Net email is sponsored by: INetU
   Attention Web Developers  Consultants: Become
 An
  INetU Hosting Partner.
   Refer Dedicated Servers. We Manage Them. You Get
  10% Monthly Commission!
   INetU Dedicated Managed Hosting
  http://www.inetu.net/partner/index.php
   ___
   iText-questions mailing list
   [EMAIL PROTECTED]
  
 

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

---
  This SF.Net email is sponsored by: INetU
  Attention Web Developers  Consultants: Become An
  INetU Hosting Partner.
  Refer Dedicated Servers. We Manage Them. You Get
 10%
  Monthly Commission!
  INetU Dedicated Managed Hosting
  http://www.inetu.net/partner/index.php
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 
 

---
 This SF.Net email is sponsored by: INetU
 Attention Web Developers  Consultants: Become An
 INetU Hosting Partner.
 Refer Dedicated Servers. We Manage Them. You Get 10%
 Monthly Commission!
 INetU Dedicated Managed Hosting
 http://www.inetu.net/partner/index.php
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

https://lists.sourceforge.net/lists

Re: Re: [iText-questions] Newbie's prob

2003-06-23 Thread Matt Benson
Always keep the list on correspondences.  I would
think the problem lies in your usage of the
PdfContentByte, and not to pass the buck, but I'll bet
Paulo knows.  :)

-Matt


--- Uwe Kristmann [EMAIL PROTECTED] wrote:
  hi matt,
 
it works,  i get the pdfstream  with the text
 HELLO StreamTest3!! (document.add)
but not the text i tried to add with
 PdfContentbyte.
both in MSIE 6.0.26
and
Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE;
 rv:1.0.2) Gecko/20021120 Netscape/7.01
don't understand why 
thanks for the reply
 
uwe
 
 Matt Benson [EMAIL PROTECTED] schrieb am
 20.06.03 19:02:15:
  
  What happens when you invoke the servlet through
 the
  browser?  Also, does it happen to work properly
 using
  a different browser?
  
  -Matt
  
  --- Uwe Kristmann [EMAIL PROTECTED] wrote:
   
hi,
 
  first to say, i'm not a great java expert and
 new
   to itext .
  
  I'm trying to write pdfcontent direct to the
   browser (MSIE 6.026) .
  It works fine for document.add, but using
   PdfContentbyte has
  no effect.
  Writing to the servers filesystem and
 redirecting
   the generated file
  to the client is ok, but i would prefer to
 write
   to a ByteArrayOutputStream.
   
  has anyone an idea what's wrong with this
 code? 

   thanks a lot 
 
uwe
   
 serverlog:
  with PdfContentByte
  [20/06/2003 19:43:44:290 GMT+02:00]
 StreamTest3:
   init
  [20/06/2003 19:43:46:793 GMT+02:00]
 StreamTest3:
   BAOS.size()= 2074
  [20/06/2003 19:43:46:893 GMT+02:00]
 StreamTest3:
   BAOS.size()= 2074
  [20/06/2003 19:45:53:115 GMT+02:00]
 StreamTest3:
   destroy
  without 
  [20/06/2003 19:45:53:165 GMT+02:00]
 StreamTest3:
   init
  [20/06/2003 19:45:55:518 GMT+02:00]
 StreamTest3:
   BAOS.size()= 1916
  [20/06/2003 19:45:55:619 GMT+02:00]
 StreamTest3:
   BAOS.size()= 1916

  //package pdfservlet;
  
 


   import java.io.ByteArrayOutputStream;
   import java.io.FileOutputStream;
   import java.io.IOException;
   import java.net.URL;
   
   import javax.servlet.http.*;
   import javax.servlet.*;
   
   import com.lowagie.text.*;
   import com.lowagie.text.pdf.BaseFont;
   import com.lowagie.text.pdf.PdfContentByte;
   import com.lowagie.text.pdf.PdfWriter;
  
 


   public class StreamTest3 extends HttpServlet {
  
 



public void init(ServletConfig config)
   throws ServletException {
   super.init(config);
   }  
  
 


   
public void doGet 
  (
   HttpServletRequest req, 
   HttpServletResponse res
  )
  throws 
   ServletException, 
   IOException
 { doPost(req,res); }
  
 



public void doPost(HttpServletRequest request,
   HttpServletResponse response)
   throws IOException, ServletException {
   
  Document document = new Document(PageSize.A4,
 50,
   50, 50, 50);  
  ByteArrayOutputStream baos = new
   ByteArrayOutputStream();   
  try {   
   PdfWriter writer =
   PdfWriter.getInstance(document,baos);
   writer.getInstance(document,baos);  
   document.open();
 /*  
   PdfContentByte cb =
 writer.getDirectContent();  

   cb.beginText();
   
   BaseFont bf =
   BaseFont.createFont(BaseFont.HELVETICA,
   BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
   
   cb.setFontAndSize(bf, 12);
   String text = Sample text for
   alignment;
   // we show some text starting on
 some
   absolute position with a given alignment
  
   cb.showTextAligned(PdfContentByte.ALIGN_CENTER,
 text
   +  Center, 250, 700, 0);
  
   cb.showTextAligned(PdfContentByte.ALIGN_RIGHT,
 text
   +  Right, 250, 650, 0);
  
   cb.showTextAligned(PdfContentByte.ALIGN_LEFT,
 text +
Left, 250, 600, 0);
   
   // we draw some text on a certain
   position
   cb.setTextMatrix(100, 400);
   cb.showText(Text at position
   100,400.);
   
   // we draw some rotated text on a
   certain position
   cb.setTextMatrix(0, 1, -1, 0, 100,
 300);
   cb.showText(Text at position
 100,300,
   rotated 90 degrees.);
   
   // we draw some mirrored, rotated
 text
   on a certain position
   cb.setTextMatrix(0, 1, 1, 0, 200,
 200);
   cb.showText(Text at position
 200,200,
   mirrored and rotated 90 degrees

Re: [iText-questions] Newbie's prob

2003-06-20 Thread Matt Benson
What happens when you invoke the servlet through the
browser?  Also, does it happen to work properly using
a different browser?

-Matt

--- Uwe Kristmann [EMAIL PROTECTED] wrote:
 
  hi,
   
first to say, i'm not a great java expert and new
 to itext .

I'm trying to write pdfcontent direct to the
 browser (MSIE 6.026) .
It works fine for document.add, but using
 PdfContentbyte has
no effect.
Writing to the servers filesystem and redirecting
 the generated file
to the client is ok, but i would prefer to write
 to a ByteArrayOutputStream.
 
has anyone an idea what's wrong with this code? 
  
 thanks a lot 
   
  uwe
 
   serverlog:
with PdfContentByte
[20/06/2003 19:43:44:290 GMT+02:00] StreamTest3:
 init
[20/06/2003 19:43:46:793 GMT+02:00] StreamTest3:
 BAOS.size()= 2074
[20/06/2003 19:43:46:893 GMT+02:00] StreamTest3:
 BAOS.size()= 2074
[20/06/2003 19:45:53:115 GMT+02:00] StreamTest3:
 destroy
without 
[20/06/2003 19:45:53:165 GMT+02:00] StreamTest3:
 init
[20/06/2003 19:45:55:518 GMT+02:00] StreamTest3:
 BAOS.size()= 1916
[20/06/2003 19:45:55:619 GMT+02:00] StreamTest3:
 BAOS.size()= 1916
  
//package pdfservlet;


 import java.io.ByteArrayOutputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.net.URL;
 
 import javax.servlet.http.*;
 import javax.servlet.*;
 
 import com.lowagie.text.*;
 import com.lowagie.text.pdf.BaseFont;
 import com.lowagie.text.pdf.PdfContentByte;
 import com.lowagie.text.pdf.PdfWriter;


 public class StreamTest3 extends HttpServlet {


  
  public void init(ServletConfig config)
 throws ServletException {
 super.init(config);
 }  


 
  public void doGet 
(
 HttpServletRequest req, 
 HttpServletResponse res
)
throws 
 ServletException, 
 IOException
   { doPost(req,res); }


  
  public void doPost(HttpServletRequest request,
 HttpServletResponse response)
 throws IOException, ServletException {
 
Document document = new Document(PageSize.A4, 50,
 50, 50, 50);  
ByteArrayOutputStream baos = new
 ByteArrayOutputStream();   
try {   
 PdfWriter writer =
 PdfWriter.getInstance(document,baos);
 writer.getInstance(document,baos);  
 document.open();
   /*  
 PdfContentByte cb = writer.getDirectContent();  
  
 cb.beginText();
 
 BaseFont bf =
 BaseFont.createFont(BaseFont.HELVETICA,
 BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
 
 cb.setFontAndSize(bf, 12);
 String text = Sample text for
 alignment;
 // we show some text starting on some
 absolute position with a given alignment

 cb.showTextAligned(PdfContentByte.ALIGN_CENTER, text
 +  Center, 250, 700, 0);

 cb.showTextAligned(PdfContentByte.ALIGN_RIGHT, text
 +  Right, 250, 650, 0);

 cb.showTextAligned(PdfContentByte.ALIGN_LEFT, text +
  Left, 250, 600, 0);
 
 // we draw some text on a certain
 position
 cb.setTextMatrix(100, 400);
 cb.showText(Text at position
 100,400.);
 
 // we draw some rotated text on a
 certain position
 cb.setTextMatrix(0, 1, -1, 0, 100, 300);
 cb.showText(Text at position 100,300,
 rotated 90 degrees.);
 
 // we draw some mirrored, rotated text
 on a certain position
 cb.setTextMatrix(0, 1, 1, 0, 200, 200);
 cb.showText(Text at position 200,200,
 mirrored and rotated 90 degrees.);
 
 // we tell the contentByte, we've
 finished drawing text
 cb.endText();
   */ 
 document.add(new Chunk(HELLO STREAMTEST
 3!!));
 document.close();

 }
 catch (DocumentException de)
 {log(de.getMessage());}
  
 response.setHeader(Expires, 0);
 response.setHeader(Cache-Control,
 must-revalidate, post-check=0, pre-check=0);
 response.setHeader(Pragma, public);
 response.setContentType(application/pdf);
 response.setContentLength(baos.size());
 log(String.valueOf(BAOS.size()=
 +String.valueOf(baos.size(;
 
 ServletOutputStream out =
 response.getOutputStream();
 baos.writeTo(out);
 out.flush();
 }
 }
 
  

__
 UNICEF bittet um Spenden fur die Kinder im Irak!
 Hier online an
 UNICEF spenden:
 

Re: [iText-questions] XMLWriter

2003-06-18 Thread Matt Benson
As I recall, the HtmlWriter does this automagically. 
I would imagine the XmlWriter would do the same.

-Matt

--- Big MAC [EMAIL PROTECTED] wrote:

-

What I was wondering is if the XMLWriter would handle
the transformation of special characters like  to
amp; , and how to specify it 

?? 






-
Add photos to your e-mail with MSN 8. Get 2 months
FREE*.---This
SF.Net email is sponsored by: INetUAttention Web
Developers  Consultants: Become An INetU Hosting
Partner.Refer Dedicated Servers. We Manage Them. You
Get 10% Monthly Commission!INetU Dedicated Managed
Hosting
http://www.inetu.net/partner/index.php___iText-questions
mailing
[EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/itext-questions


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Bar code

2003-06-17 Thread Matt Benson
Skip the BaseFont instantiation:

myBarcode39.setFont(null);

-Matt



--- Bradley Glonka [EMAIL PROTECTED] wrote:
 
 Stupid question.
 How do you set the font to null?
 I've tried
 BaseFont bf = BaseFont.createFont(null, null);
 Code39.setfont(bf);
 
 I'm getting complaints about the way I'm creating
 bf.
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] 
 
 [mailto:[EMAIL PROTECTED]
 On 
  Behalf Of Paulo Soares
  Sent: Monday, June 16, 2003 4:53 PM
  To: Bradley Glonka;
 [EMAIL PROTECTED]
  Subject: Re: [iText-questions] Bar code
  
  
  The text cannot be different but can be suppressed
 by setting 
  the font to null.
  
  Best Regards,
  Paulo Soares
  
  - Original Message -
  From: Bradley Glonka [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, June 16, 2003 21:07
  Subject: [iText-questions] Bar code
  
  
   Hi,
  
   Is there a way to set the text below the bar
 code different 
  than the 
   data that is bar coded? Alternatively is there a
 way not to 
  print that 
   text.
  
   Thanks
   Brad
  
  
  
  
  

---
   This SF.NET email is sponsored by: eBay
   Great deals on office technology -- on eBay now!
 Click here: 
  
 http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
   ___
   iText-questions mailing list
 [EMAIL PROTECTED]
  

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

---
  This SF.Net email is sponsored by: INetU
  Attention Web Developers  Consultants: Become An
 INetU 
  Hosting Partner.
  Refer Dedicated Servers. We Manage Them. You Get
 10% Monthly 
  Commission!
  INetU Dedicated Managed Hosting
 http://www.inetu.net/partner/index.php
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

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

---
 This SF.Net email is sponsored by: INetU
 Attention Web Developers  Consultants: Become An
 INetU Hosting Partner.
 Refer Dedicated Servers. We Manage Them. You Get 10%
 Monthly Commission!
 INetU Dedicated Managed Hosting
 http://www.inetu.net/partner/index.php
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Re: search a string from pdf file

2003-06-17 Thread Matt Benson
Yep, you're probably better off using something else. 
Most notable are JPedal and PdfBox, with the latter
being simpler and the former having more features.

-Matt

--- Bruno [EMAIL PROTECTED] wrote:
 Quoting [EMAIL PROTECTED]:
 
  
  Hi,
  Is that posible to read a string from a input pdf
 file? for example: input
  pdf Hello World. Can I read this pdf file and
 search Hello World then
  System.out.print(Hello World)
  if met.
 
 Please post this kind of question to the
 mailinglist:
 [EMAIL PROTECTED]
 In some cases it is possible to retrieve text from a
 PDF
 using iText, but the functionality is not
 waterproof.
 br,
 Bruno
 
 

---
 This SF.Net email is sponsored by: INetU
 Attention Web Developers  Consultants: Become An
 INetU Hosting Partner.
 Refer Dedicated Servers. We Manage Them. You Get 10%
 Monthly Commission!
 INetU Dedicated Managed Hosting
 http://www.inetu.net/partner/index.php
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Locking Documents using iText

2003-06-17 Thread Matt Benson
When you write the PDFs, use the method
PdfWriter.setEncryption() and set it with the
constants provided in PdfWriter:  Allow*.  You might
want to start with zero/no permissions and see what
that does?

-Matt


--- Subbiah [EMAIL PROTECTED] wrote:
 Hi,
 I am using iText to convert text documents to pdf,
 but if I open it in Adobe Acrobat 5 and try to make
 Text adjustments, it alows me to make them. I want
 to know if there is a method if we can disable this.
 Thank you very much
 
 regards,
 Don S
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Spacing between lines

2003-06-17 Thread Matt Benson
use setLeading().

-Matt

--- Subbiah [EMAIL PROTECTED] wrote:
 Hi,
  I am trying to reduce the space between 2 lines
 during conversion of 
  text file into a pdf file. Kindly look at the
 attached pdf. Thank you
  for your help.
  
  I am using this:
  
  String line;
  while((line =3D in.readLine()) !=3D
 null) {
  Paragraph para =3D new 
 

Paragraph(line,FontFactory.getFont(FontFactory.COURIER,
 10, 
  Font.NORMAL));
  document.add(para);
  }
 
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Bar code

2003-06-16 Thread Matt Benson
To suppress the text, set the font to null.

-Matt

--- Bradley Glonka [EMAIL PROTECTED] wrote:
 Hi,
 
 Is there a way to set the text below the bar code
 different than the
 data that is bar coded? Alternatively is there a way
 not to print that
 text.
 
 Thanks
 Brad
 
 
 
 

---
 This SF.NET email is sponsored by: eBay
 Great deals on office technology -- on eBay now!
 Click here:
 http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


---
This SF.Net email is sponsored by: INetU
Attention Web Developers  Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] linearization(optimization) of PDF

2003-06-13 Thread Matt Benson
If you want to linearize existing PDFs, take a look at
PdfEnhancer from PDF Sages http://www.pdfsages.com .

-Matt

--- $B6L1[(B [EMAIL PROTECTED] wrote:
 Hi,
 
 I wonder if iText can linearize(optimize) generated
 (or existing) PDFs.
 Is it possible?
 
 best regards.
 
 

---
 This SF.NET email is sponsored by: eBay
 Great deals on office technology -- on eBay now!
 Click here:
 http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Fonts on Unix

2003-06-12 Thread Matt Benson
Add some?  If you install ghostPcl you could get a lot
of (pretty much) openly-licensed fonts that way...
downside:  they are installed in /windows/fonts.

-Matt

--- Dimiceli, John - OSHA [EMAIL PROTECTED]
wrote:
 How do I use different fonts on a UNIX machine that
 may not have the
 extensive font library normally available to
 Windows?
 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] Fonts on Unix

2003-06-12 Thread Matt Benson
1 and 2 sound right (although I wouldn't think there
is truly a concept of font installation in a basic
Unix environment, hence my use of the word add as in
have the file present), but honestly, your final
statement is beyond my experience.  Fortunately, in my
travels through the iText universe I have never yet
had to deal with fonts other than those included
within iText... :)

-Matt

--- Dimiceli, John - OSHA [EMAIL PROTECTED]
wrote:
 Matt - OK, the issues are becoming clearer...
 
 1. Fonts may have licenses. (Amazing what I take for
 granted on Windows.)
 2. The fonts must be installed somewhere on my UNIX
 OS, then the file
 referenced in BaseFont.createFont.
 
 I assume if using anything other than a TYPE 1 font,
 the safe thing is to
 embed the font in the document to ensure the
 document renders as developed.
 
 -Original Message-
 From: Matt Benson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 12, 2003 9:55 AM
 To: Dimiceli, John - OSHA; 'itext'
 Subject: Re: [iText-questions] Fonts on Unix
 
 
 Add some?  If you install ghostPcl you could get a
 lot
 of (pretty much) openly-licensed fonts that way...
 downside:  they are installed in /windows/fonts.
 
 -Matt
 
 --- Dimiceli, John - OSHA [EMAIL PROTECTED]
 wrote:
  How do I use different fonts on a UNIX machine
 that
  may not have the
  extensive font library normally available to
  Windows?
  
 
 
 __
 Do you Yahoo!?
 Yahoo! Calendar - Free online calendar with sync to
 Outlook(TM).
 http://calendar.yahoo.com
 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] (no subject)

2003-06-09 Thread Matt Benson
FYI:  I searched for pfb afm font generate on Google
and found a link to a script

http://www.tug.org/tex-archive/fonts/utilities/t1tools/makeafm

-Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 iText does not support PCL fonts. To use PFB fonts
 you'll also need the AFM
 file. This AFM file is used when creating the font.
 If you don't have the
 AFM file you can recreate it from the PFB.
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   arse  alam [SMTP:[EMAIL PROTECTED]
  Sent:   Monday, June 09, 2003 15:46
  To: [EMAIL PROTECTED]
  Subject:[iText-questions] (no subject)
  
  
  Dear Sir,
  
  We are using PCL Bit-screen  Postscript *.pbf
 fonts.
How can we use these fonts in your iText
 library. Is this
  possible, our fonts are unmapped differently 7 are
 not an 
  unicode,
  We would like to avoid re-entry if volumum test.
  We are axaming using your product to make PDF
 files.
  
  Please try to provide me an ultimate solution.
  
  Thank you
  
  
  
  
 
 ___
  Impress your clients! Send mail from me @
 mycompany.com .
  Just Rs.1499/year.
  Click http://www.rediffmailpro.com to know more.
  
  
  
 

---
  This SF.net email is sponsored by:  Etnus, makers
 of TotalView, The best
  thread debugger on the planet. Designed with
 thread debugging features
  you've never dreamed of, try TotalView 6 free at
 www.etnus.com.
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

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

---
 This SF.net email is sponsored by:  Etnus, makers of
 TotalView, The best
 thread debugger on the planet. Designed with thread
 debugging features
 you've never dreamed of, try TotalView 6 free at
 www.etnus.com.
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Linearized PDF

2003-06-05 Thread Matt Benson
True, iText does not support linearized PDF.  Check
out Leonard's PdfEnhancer tool at www.pdfsages.com.

-Matt

--- Jerold Sampson [EMAIL PROTECTED] wrote:
  From everything I have read so far it appears that
 iText does not support
 linearized PDF.  Is this true?  If so, is anyone
 aware of a product that
 does or possibly even a post-processor that could
 grind up the the PDF
 and restructure it?
 
 Thanks in advance,
 Jerold Sampson
 Jerold R Sampson
 TallPine Technologies, Inc.
 
 www.tallpine.com
 303-415-1203
 
 

---
 This SF.net email is sponsored by:  Etnus, makers of
 TotalView, The best
 thread debugger on the planet. Designed with thread
 debugging features
 you've never dreamed of, try TotalView 6 free at
 www.etnus.com.
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Win32 port of iText

2003-06-04 Thread Matt Benson
You already know about iTextdotnet on sourceforge?

-Matt

--- Volker Schnuck [EMAIL PROTECTED] wrote:
 Hello,
 
 is there a win32 port of iText availabe? We need
 exactly the described
 functionality in a single system scenario (Visual
 C++ or Visual Basic).
 
 Any ideas?
 
 Best regards, Volker.
 
 
 
 
 

---
 This SF.net email is sponsored by: eBay
 Get office equipment for less on eBay!
 http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Extending iText classes

2003-05-31 Thread Matt Benson
I'm not sure what is wrong, but it is possible and
encouraged that you should extend the iText elements
when necessary.

-Matt

--- [EMAIL PROTECTED] wrote:
 
 
 
 
 Hello,
 
 I'm in the situation with a project where I'd like
 to extend some of the
 iText classes (such as Chunk, Paragraph, and
 Chapter) in order to add some
 simple properties which I will use for sorting.
 After the sorting I will
 add my objects to a Document.
 
 I've just extended the Chunk class for testing; I
 haven't even added any of
 my own properties yet. But whenever I try to add my
 extension of Chunk to a
 Paragraph object I get a null pointer exception,
 even when I cast the
 object as an iText Chunk.
 
 Is it possible to extend the iText classes and add
 them to Documents
 (without tinkering around with other classes)? Has
 anyone done this?
 
 Thanks in advance for any help,
 
 Andrew Luxner
 
 
 

---
 This SF.net email is sponsored by: eBay
 Get office equipment for less on eBay!
 http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Question about line height for paging

2003-05-30 Thread Matt Benson
There is a FAQ entry on this that appears to advocate
putting the entire contents of the file into a String
and adding that to the document in a single Paragraph.

http://www.lowagie.com/iText/faq.html#preformattedtext

-Matt

---  Alex, Ian [EMAIL PROTECTED] wrote:
 I am having a problem with writing a Unix-created
 document to PDF using
 iText.   Unix output files don't use any fonts and
 there is minimal spacing
 between lines (using the lpr output).   My algorithm
 was to read each line
 in from the original file and then write it to PDF
 landscape document with
 the appropriate font (Courier) to preserve the
 alignment, just using code
 like this:
 
 String line;
 PdfWriter.getInstance(document, new
 FileOutputStream(PDFname));
 BaseFont bf1 = BaseFont.createFont(Courier,
 BaseFont.WINANSI,
 BaseFont.EMBEDDED);
 bf1.setDirectTextToByte(true);
 Font font = new Font(bf1, (float)10, Font.NORMAL);
 Document document = new
 Document(PageSize.A4.rotate(), 0, 0, 0, 0);
 document.open();
 document.setLinesRequired(56);
 BufferedReader reader = new BufferedReader(new
 FileReader(inFile));
 while ((line = reader.readLine()) != null) { 
document.add(new Paragraph(line,font));
 }
 
 This didn't work since  each *line* occupied a large
 height (twice the size
 as the text height regardless of font).  I wanted to
 adjust this but
 couldn't.   I saw a class in the API called
 com.lowagie.text.pdf.PdfLine
 that has a height() method but no get methods to
 adjust the height.
 Furthermore, there is no binding between PdfLine
 objects and the Document
 class.
 
 Next I tried mapping each page to a table so that
 all the cells would fit.
 The number of lines in each page of the unix file
 was 56.My code for
 this looked something like:
 
 String line;
 cnt=1;
 Document document = new
 Document(PageSize.A4.rotate(), 0, 0, 0, 0);
 document.open();
 BufferedReader reader = new BufferedReader(new
 FileReader(inFile));
 Table datatable;
 datatable = new Table(1);
 datatable.setWidth(160);
 datatable.setDefaultCellBorderWidth(0);
 atatable.setDefaultHorizontalAlignment(0);
 datatable.setDefaultRowspan(1);
 datatable.setSpaceBetweenCells(0);
 datatable.setBorderWidth(0);
 datatable.setCellsFitPage(true);
 while ((line = reader.readLine()) != null) { 
 BaseFont bf1 = BaseFont.createFont(Courier,
 BaseFont.WINANSI,
 BaseFont.EMBEDDED);
 bf1.setDirectTextToByte(true);
 cell = new Cell(new Phrase(padStringWidth(line,
 132), new Font(bf1, 10,
 Font.COURIER)));

 cell.setHorizontalAlignment(Element.ALIGN_CENTER);
 cell.setVerticalAlignment(Element.ALIGN_TOP);
 cell.setColspan(1);
 cell.setRowspan(1);
 cell.setNoWrap(true);
// cell.setBorder(Rectangle.NO_BORDER);
 cell.setBorderColor(java.awt.Color.gray);
 datatable.addCell(cell);
 if (cnt == 56) {
document.add(datatable);
document.newPage();
datatable = new Table(1);
datatable.setWidth(160);
datatable.setDefaultCellBorderWidth(0);
datatable.setDefaultHorizontalAlignment(0);
datatable.setDefaultRowspan(1);
datatable.setBorderWidth(0);
datatable.setSpaceBetweenCells(0);
datatable.setCellsFitPage(true);
cnt=0;
  }
  cnt++;
 }
 
 Please note that I used
 cell.setBorderColor(java.awt.Color.gray) in order to
 display the cell boundaries.   In experimenting with
 different font sizes, I
 noted that just as was the case with just lines, the
 text height only
 occupied half the cell (the cell size increased
 proportionally along with
 the font - just as with lines).  I used various
 suggestions I saw previously
 such as calling datatable.setBorderWidth(0),
 datatable.setSpaceBetweenCells(0) 
 datatable.setCellsFitPage(true) and none
 of these worked. 
 
 The most promising suggestion I saw was from

http://article.gmane.org/gmane.comp.java.lib.itext.general/1225/match=line+h
 eight which suggested using the height method of the
 Cell class (inherited
 from Rectangle).   height() is a get method so I
 instead thought of
 working with the setBottom()  setTop() methods
 (inherited by Cell from
 Rectangle).  It compiled OK, but I got the run-time
 error: 
 
 java.lang.UnsupportedOperationException: Dimensions
 of a Cell are attributed
 aut
 omagically. See the FAQ.
 at com.lowagie.text.Cell.setBottom(Unknown
 Source)
 at TestPDF.putPDF(TestPDF.java:158)
 at TestPDF.run(TestPDF.java:28)
 at TestPDF.main(TestPDF.java:17)
 
 Could you give me some suggestions as to how to
 adjust my application so
 that I can reduce the height of a line (or cell)
 holding text.
 
 Thanks for your attention.
 
 
 
 
 
 
 
 
 
 
 

---
 This SF.net email is sponsored by: eBay
 Get office equipment for less on eBay!
 http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]


Re: [iText-questions] Using servlet for merging files

2003-05-29 Thread Matt Benson
And what problem are you experiencing?

-Matt

--- v b [EMAIL PROTECTED] wrote:
 Hi All,
 I'm trying to do the following: 1. create one page
 pdf file with some content 2. import multiple pdf
 files 3. concat everything into one document and
 show this document in the browser. Note everything
 should be done using servlet in the Tomcat
 environment.
  
 I tried to use some of the provided examples.
  
  
 import java.io.*;
 import java.text.*;
 import java.util.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 import com.lowagie.text.*;
 import com.lowagie.text.pdf.*;
  
   public class PDFTest extends HttpServlet
   {
  public void doGet(HttpServletRequest
 request,
HttpServletResponse response) throws
 ServletException, IOException
  {
OutputStream out = response.getOutputStream();
ByteArrayOutputStream baos = new
 ByteArrayOutputStream();
 
String args[] = { C:\\Chap0101.pdf,
 C:\\Chap0102.pdf,C:\\Chap0103.pdf,
 C:\\Chap0201.pdf};
 try
 {
 Document document = new Document();
 PdfWriter.getInstance(document, baos);
 document.open();
 document.add(new Paragraph(Hello World));
 document.add(new Paragraph(Hello World));
 /*--*/
   int f = 0;
 //  String outFile = args[args.length-1];
 //  Document document = null;
   PdfCopy  writer = null;
   while (f  args.length-1) {
   // we create a reader for a certain
 document
   PdfReader reader = new PdfReader(args[f]);
   // we retrieve the total number of pages
   int n = reader.getNumberOfPages();
   System.out.println(There are  + n + 
 pages in  + args[f]);
   if (f == 0) {
 // step 1: creation of a document-object
 document = new
 Document(reader.getPageSizeWithRotation(1));
 //// step 2: we create a writer that listens
 to the document
 //writer = new PdfCopy(document, new
 FileOutputStream(outFile));
 // step 3: we open the document
 document.open();
   }
   // step 4: we add content
   PdfImportedPage pdfPage;
   for (int i = 0; i  n; ) {
 ++i;
 pdfPage = writer.getImportedPage(reader, i);
 writer.addPage(pdfPage);
 System.out.println(Processed page  + i);
   }
   PRAcroForm form = reader.getAcroForm();
 //  if (form != null)
 //writer.copyAcroForm(reader);
 //  f++;
   }
 /*--*/
 document.close();
 response.setContentType(application/pdf);
 response.setContentLength(baos.size());
 response.setBufferSize(baos.size());
 baos.writeTo(out);
 out.flush();
 }
 catch (Exception e)
 {
System.err.println(e.toString());
 }
 finally
 {
out.close();
}
  }
   }
 
 
 
 
 -
 Do you Yahoo!?
 Free online calendar with sync to Outlook(TM).


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Using servlet for merging files

2003-05-29 Thread Matt Benson
See Chapter 13 of the tutorial:
http://www.lowagie.com/iText/tutorial/ch13.html 

-Matt

--- v b [EMAIL PROTECTED] wrote:
 I'm able to create pdf in the servlet and show it in
 the browser as well as merge multiple pdfs. My
 problem is i do not know how to add existing pdf
 files to newly created pdf.
 
 Matt Benson [EMAIL PROTECTED] wrote:And what
 problem are you experiencing?
 
 -Matt
 
 --- v b wrote:
  Hi All,
  I'm trying to do the following: 1. create one page
  pdf file with some content 2. import multiple pdf
  files 3. concat everything into one document and
  show this document in the browser. Note everything
  should be done using servlet in the Tomcat
  environment.
  
  I tried to use some of the provided examples.
  
  
  import java.io.*;
  import java.text.*;
  import java.util.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  import com.lowagie.text.*;
  import com.lowagie.text.pdf.*;
  
  public class PDFTest extends HttpServlet
  {
  public void doGet(HttpServletRequest
  request,
  HttpServletResponse response) throws
  ServletException, IOException
  {
  OutputStream out = response.getOutputStream();
  ByteArrayOutputStream baos = new
  ByteArrayOutputStream();
  
  String args[] = { C:\\Chap0101.pdf,
  C:\\Chap0102.pdf,C:\\Chap0103.pdf,
  C:\\Chap0201.pdf};
  try
  {
  Document document = new Document();
  PdfWriter.getInstance(document, baos);
  document.open();
  document.add(new Paragraph(Hello World));
  document.add(new Paragraph(Hello World));
  /*--*/
  int f = 0;
  // String outFile = args[args.length-1];
  // Document document = null;
  PdfCopy writer = null;
  while (f  args.length-1) {
  // we create a reader for a certain
  document
  PdfReader reader = new PdfReader(args[f]);
  // we retrieve the total number of pages
  int n = reader.getNumberOfPages();
  System.out.println(There are  + n + 
  pages in  + args[f]);
  if (f == 0) {
  // step 1: creation of a document-object
  document = new
  Document(reader.getPageSizeWithRotation(1));
  // // step 2: we create a writer that listens
  to the document
  // writer = new PdfCopy(document, new
  FileOutputStream(outFile));
  // step 3: we open the document
  document.open();
  }
  // step 4: we add content
  PdfImportedPage pdfPage;
  for (int i = 0; i  n; ) {
  ++i;
  pdfPage = writer.getImportedPage(reader, i);
  writer.addPage(pdfPage);
  System.out.println(Processed page  + i);
  }
  PRAcroForm form = reader.getAcroForm();
  // if (form != null)
  // writer.copyAcroForm(reader);
  // f++;
  }
  /*--*/
  document.close();
  response.setContentType(application/pdf);
  response.setContentLength(baos.size());
  response.setBufferSize(baos.size());
  baos.writeTo(out);
  out.flush();
  }
  catch (Exception e)
  {
  System.err.println(e.toString());
  }
  finally
  {
  out.close();
  }
  }
  }
  
  
  
  
  -
  Do you Yahoo!?
  Free online calendar with sync to Outlook(TM).
 
 
 __
 Do you Yahoo!?
 Yahoo! Calendar - Free online calendar with sync to
 Outlook(TM).
 http://calendar.yahoo.com
 
 
 -
 Do you Yahoo!?
 Free online calendar with sync to Outlook(TM).


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com


---
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] indexing PDF content

2003-04-04 Thread Matt Benson
  Actually what I wanted to do with the content almost
amounts to metrics:  I want to run through the text
and check each word against some REs, taking different
actions for the words that satisfy the REs (mostly
counting words).  I was thinking about using an Antlr
parser/lexer to do this, once I have the text.  I
searched on FreshMeat yesterday and didn't find
anything that looked like it was geared for what I'm
looking for.  It may be that most of the things that
exist are not really designed to be interrupted where
I need to interrupt them.

  Of course when I said a package, I meant an open
source Java API.  :)  I'm cheap.

Thanks,
Matt

--- Leonard Rosenthol [EMAIL PROTECTED] wrote:
 At 03:03 PM 4/3/2003 -0800, Matt Benson wrote:
 Does anyone (Leonard) know of a package that will
 do
 this, or should I implement parsing text from one
 of
 JPedal or PdfBox?
 
  There are LOTS of PDF indexing engines out
 there - commercial, 
 open source, your choice of languages, etc.   Do a
 search on FreshMeat...
 
  OR you could indeed use JPEDAL or PdfBox to
 do it yourself - but 
 that's just the extraction, indexing is the harder
 part to get right, esp. 
 if you plan to offer linquistic support (stemming,
 Unicode, etc.) and 
 efficient storage of the tables.
 
 
 Leonard

---
 Leonard Rosenthol   
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
 


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] indexing PDF content

2003-04-04 Thread Matt Benson
That's where I was leaning.  Thanks, Leonard.

-Matt

--- Leonard Rosenthol [EMAIL PROTECTED] wrote:
 At 07:07 AM 4/4/2003 -0800, Matt Benson wrote:
Actually what I wanted to do with the content
 almost
 amounts to metrics:  I want to run through the text
 and check each word against some REs, taking
 different
 actions for the words that satisfy the REs (mostly
 counting words).
 
  Use JPEDAL or PdfBox, extract the text,
 then check it.  Both of 
 those products will handle your needs just fine...
 
 
 Leonard

---
 Leonard Rosenthol   
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
 


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] indexing PDF content

2003-04-03 Thread Matt Benson
Does anyone (Leonard) know of a package that will do
this, or should I implement parsing text from one of
JPedal or PdfBox?

Thanks,
Matt

__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] only one printing

2003-03-31 Thread Matt Benson
I guess my question, notwithstanding Leonard's direct
answer, would be what is the purpose of this
restriction?

-Matt

--- HELLEBOID David (CAMPUS)
[EMAIL PROTECTED] wrote:
 Hi all,
 
 Using Itext and tomcat, I have to generate pdf bills
 that have to be printed
 only one time. I managed not to cache the document
 in the browser cache, but
 users are still able to print the pdf several times.
 Is there a way to allow
 only one printing of the document (I don't think so
 ...), or to
 automatically print the document (of course, the
 print button has then to be
 disabled ..)
 
 Thanks for your help,
 
 David HELLEBOID 
 Unix Systems Engineer
 Tel: +33 (0)3 20 19 70 94 
 E-mail: [EMAIL PROTECTED] 
 
 
 
 

---
 This SF.net email is sponsored by: ValueWeb: 
 Dedicated Hosting for just $79/mo with 500 GB of
 bandwidth! 
 No other company gives more support or power for
 your dedicated server

http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] New release itext-paulo-113

2003-03-26 Thread Matt Benson
I know--is the implication that this method's
existence might be misleading to the new user and
generate a lot of e-mails to the list?  ;)

-Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 setMetadata would need something like PdfStamper to
 write new content.
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   Matt Benson [SMTP:[EMAIL PROTECTED]
  Sent:   Tuesday, March 25, 2003 15:43
  To: Paulo Soares;
 '[EMAIL PROTECTED]'
  Subject:Re: [iText-questions] New release
 itext-paulo-113
  
  Nice, but out of curiosity, why did you decide not
 to
  add a corresponding setMetadata method?
  
  -Matt
  
  --- Paulo Soares [EMAIL PROTECTED] wrote:
   Changes in itext-paulo-113 (2003-03-25)
   
   - added a new arabic shaper with farsi
 support.
   
   - FdfWriter will also output the fields from
 a
   PdfReader and AcroFields.
   
   - fixed PdfAcroForm for a problem when
 creating
   text fields. The /DA key
 was being generated incorrectly.
   
   - added a file attachment annotation.
   
   - the subtype for the ink annotation was
 wrong.
   
   - modified toPdf() method to write directly
 to
   the stream.
   OutputStreamCounter
 was created to aid.
   
   - added ModDate to the info dictionary.
   
   - added methods in PdfPTable to set absolute
   column widths.
   
   - added PdfReader.getMetadata() to get the
 XML
   metadata.
   
   - speed improvement in PdfReader.
   
   - fixed a bug in PdfStamperImp when stamping
 or
   flattening and the
   original page
 content didn't end in an whitespace.
   
   - added the ability to manipulate directly
 the
   catalog and the info
   dictionary
 in PdfWriter. Other methods where made
 public
   for ease of access to
   low level
 features.
   
   
   
   All this at:
   
   http://www.geocities.com/itextpdf
   Mirror at http://itext.execuchoice.net
   
   Best Regards,
   Paulo Soares
   
   
   
  
 

---
   This SF.net email is sponsored by:
   The Definitive IT and Networking Event. Be
 There!
   NetWorld+Interop Las Vegas 2003 -- Register
 today!
  
 

http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
   ___
   iText-questions mailing list
   [EMAIL PROTECTED]
  
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
  
  
  __
  Do you Yahoo!?
  Yahoo! Platinum - Watch CBS' NCAA March Madness,
 live on your desktop!
  http://platinum.yahoo.com


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] rotation

2003-03-26 Thread Matt Benson
This looks handy and useful!  Thanks!

-Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 See the code in PdfContentByte.addImage().
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   Matt Benson [SMTP:[EMAIL PROTECTED]
  Sent:   Tuesday, March 25, 2003 20:26
  To: Paulo Soares; itext-questions
  Subject:Re: [iText-questions] rotation
  
  Is there a way to convert a PdfImportedPage to an
  Image so that I can avoid duplication of code and
 use
  matrix() to do the calculations for arbitrary
  rotations?  Or even if I have to copy code, the
 array
  returned is
  
  [AX, AY, BX, BY, CX, CY, DX, DY]
  
  Do these correspond to a, b, c, and d of THE
  Transformation Matrix?  If so, how do I resolve
 AX 
  AY to a, etc?
  
  Thanks,
  Matt
  
  
  --- Paulo Soares [EMAIL PROTECTED] wrote:
   What you have is a translation and a rotation.
 The
   rotation pivot is always
   the bottom left point of the object. The
 translation
   makes the object to
   still have the bottom left as the reference. An
   object rotated 90 degrees
   disappears to the left and must be pulled right
 by
   it's height that now, as
   the object is laying down, counts as the width.
   For arbitrary angles the calculations are the
 same
   but the angle are
   not -1,0,1. See Image.matrix() for all those
   calculations.
   This is all explained in chapter 4.2 of the PDF
   reference 1.4.
   
   Best Regards,
   Paulo Soares
   - Original Message -
   From: Matt Benson [EMAIL PROTECTED]
   To: itext-questions
   [EMAIL PROTECTED]
   Sent: Thursday, March 20, 2003 21:11
   Subject: [iText-questions] rotation
   
   
I am using the following values to assist with
(clockwise) rotation:
   
90 degrees: 0, -1, 1, 0, 0, rect.height()
180 degrees: -1, 0, 0, -1, rect.width(),
   rect.height()
270 degrees: 0, 1, -1, 0, rect.width(), 0
0/360 degrees: 1, 0, 0, 1, 0, 0
   
Paulo gave me the values for 90 and 0/360 ages
 ago
   and
I played with them until I figured out how to
 do
   180
and 270.  These work, but I am having
 difficulty
understanding how they fit into the
cosine-sine-negative sine-cosine instructions
 in
   the
tutorial and from Adobe.  What is the formula
 that
fits these data and would allow rotation to
   arbitrary
angles?
   
Thanks,
Matt
   
   
 __
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March
 Madness,
   live on your desktop!
http://platinum.yahoo.com
   
   
   
  
 

---
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a
   Tablet PC.
Get a free Tablet PC hat just for playing.
 What
   are you waiting for?
   
  
 

http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
   
 ___
iText-questions mailing list
[EMAIL PROTECTED]
   
  
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
   
   
  
  
  __
  Do you Yahoo!?
  Yahoo! Platinum - Watch CBS' NCAA March Madness,
 live on your desktop!
  http://platinum.yahoo.com
 
 

---
 This SF.net email is sponsored by:
 The Definitive IT and Networking Event. Be There!
 NetWorld+Interop Las Vegas 2003 -- Register today!

http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Portuguese IRS uses iText

2003-03-26 Thread Matt Benson
:)

--- Paulo Soares [EMAIL PROTECTED] wrote:
 Just out of curiosity I got today my electronic tax
 declaration in PDF and,
 surprise, was made with itext-paulo-112.
 
 Best Regards,
 Paulo Soares
 
 

---
 This SF.net email is sponsored by:
 The Definitive IT and Networking Event. Be There!
 NetWorld+Interop Las Vegas 2003 -- Register today!

http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] New release itext-paulo-113

2003-03-26 Thread Matt Benson
I could live with that.  I just figure I probably
won't be the last person to want to do this.  Would
you want to provide any support for structuring the
XMP?  There are a lot of things that seem to be fairly
constant with XMP.  I have attached the constants I
used.  I ignored the bytes attribute of the ?xpacket
tag, but it should be easy to set if this were put
into a nice central location within iText.

-Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 Well, I suppose that the method in PdfStamper would
 make sense.
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   Matt Benson [SMTP:[EMAIL PROTECTED]
  Sent:   Wednesday, March 26, 2003 17:22
  To: Paulo Soares;
 '[EMAIL PROTECTED]'
  Subject:RE: [iText-questions] New release
 itext-paulo-113
  
  I know--is the implication that this method's
  existence might be misleading to the new user and
  generate a lot of e-mails to the list?  ;)
  
  -Matt
  
  --- Paulo Soares [EMAIL PROTECTED] wrote:
   setMetadata would need something like PdfStamper
 to
   write new content.
   
   Best Regards,
   Paulo Soares
   
-Original Message-
From:   Matt Benson [SMTP:[EMAIL PROTECTED]
Sent:   Tuesday, March 25, 2003 15:43
To: Paulo Soares;
   '[EMAIL PROTECTED]'
Subject:Re: [iText-questions] New release
   itext-paulo-113

Nice, but out of curiosity, why did you decide
 not
   to
add a corresponding setMetadata method?

-Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 Changes in itext-paulo-113 (2003-03-25)
 
 - added a new arabic shaper with farsi
   support.
 
 - FdfWriter will also output the fields
 from
   a
 PdfReader and AcroFields.
 
 - fixed PdfAcroForm for a problem when
   creating
 text fields. The /DA key
   was being generated incorrectly.
 
 - added a file attachment annotation.
 
 - the subtype for the ink annotation was
   wrong.
 
 - modified toPdf() method to write
 directly
   to
 the stream.
 OutputStreamCounter
   was created to aid.
 
 - added ModDate to the info dictionary.
 
 - added methods in PdfPTable to set
 absolute
 column widths.
 
 - added PdfReader.getMetadata() to get
 the
   XML
 metadata.
 
 - speed improvement in PdfReader.
 
 - fixed a bug in PdfStamperImp when
 stamping
   or
 flattening and the
 original page
   content didn't end in an whitespace.
 
 - added the ability to manipulate
 directly
   the
 catalog and the info
 dictionary
   in PdfWriter. Other methods where made
   public
 for ease of access to
 low level
   features.
 
 
 
 All this at:
 
 http://www.geocities.com/itextpdf
 Mirror at http://itext.execuchoice.net
 
 Best Regards,
 Paulo Soares
 
 
 

   
  
 

---
 This SF.net email is sponsored by:
 The Definitive IT and Networking Event. Be
   There!
 NetWorld+Interop Las Vegas 2003 -- Register
   today!

   
  
 

http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en

 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

   
  
 

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


   
 __
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March
 Madness,
   live on your desktop!
http://platinum.yahoo.com
  
  
  __
  Do you Yahoo!?
  Yahoo! Platinum - Watch CBS' NCAA March Madness,
 live on your desktop!
  http://platinum.yahoo.com
  
  
 

---
  This SF.net email is sponsored by:
  The Definitive IT and Networking Event. Be There!
  NetWorld+Interop Las Vegas 2003 -- Register today!
 

http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 
https://lists.sourceforge.net/lists/listinfo/itext-questions


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.comprivate static final String X_PACKET_START
 = ?xpacket begin='\ufeff' id='W5M0MpCehiHzreSzNTczkc9d'?;
private static final String X_PACKET_END = ?xpacket end='w'?;

private static final String PDF_URI = http://ns.adobe.com/pdf/1.3/;;
private static final String PDF_PREFIX = pdf;

private static final String PDFX_URI = http://ns.adobe.com/pdfx/1.3/;;
private static final String PDFX_PREFIX = pdfx;

private static final String DC_URI = http://purl.org/dc/elements/1.1/;;
private static final String DC_PREFIX = dc;


Re: [iText-questions] New release itext-paulo-113

2003-03-26 Thread Matt Benson
Well, that's just it.  Seems that if the metadata in
the catalog is always to be XMP XML, then the solution
is pretty much ready-made based on what I have done.

The XMP is, as far as I can tell, RDF XML embedded in
?xpacket tags.  These are the only part that are
peculiar to XMP (this may be an oversimplified
approach as I have not absorbed the entire XMP spec,
but it's a start).

  The problem is that getMetadata() already returns
the whole stream, including these external tags.  This
suggests that setMetadata() should accept similar
data, and leads me to the idea that we can set up the
?xpacket tags in another class.  Setting these for
output is easy.  If we provide comparable input
functionality, however, it would probably be most
sensible to use an XML parser to strip off the
?xpacket tags.  Using the Jena-RDF API I didn't have
to worry about this because the package is equipped to
find embedded RDF and discard the containing XML.

  The simplest thing, then, might just be to include a
static method String xmpWrap(String rdf) or some such
on PdfStamper and recommend Jena for processing and
morphing the RDF.  The most versatile approach, on the
other hand, would be to include a facility for
retrieving the embedded RDF from the metadata.  In
this case, again, we would be best off using an XML
parser, and that brings up the question of whether
this might belong in iTextXML.jar, and/or in a package
com.lowagie.text.pdf.xmp?

If we can decide the best approach, I can implement.

-Matt


--- Paulo Soares [EMAIL PROTECTED] wrote:
 I know nothing about XMP and I don't even know
 what's that for. If someone
 shows up with a ready made solution I'll integrate
 it into iText otherwise I
 won't do any development on it. Sorry.
 
 Best Regards,
 Paulo Soares
 
 - Original Message -
 From: Matt Benson [EMAIL PROTECTED]
 To: Paulo Soares [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Wednesday, March 26, 2003 17:47
 Subject: RE: [iText-questions] New release
 itext-paulo-113
 
 
  I could live with that.  I just figure I probably
  won't be the last person to want to do this. 
 Would
  you want to provide any support for structuring
 the
  XMP?  There are a lot of things that seem to be
 fairly
  constant with XMP.  I have attached the
 constants I
  used.  I ignored the bytes attribute of the
 ?xpacket
  tag, but it should be easy to set if this were put
  into a nice central location within iText.
 
  -Matt
 
  --- Paulo Soares [EMAIL PROTECTED] wrote:
   Well, I suppose that the method in PdfStamper
 would
   make sense.
  
   Best Regards,
   Paulo Soares
  
-Original Message-
From: Matt Benson [SMTP:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 17:22
To: Paulo Soares;
   '[EMAIL PROTECTED]'
Subject: RE: [iText-questions] New release
   itext-paulo-113
   
I know--is the implication that this method's
existence might be misleading to the new user
 and
generate a lot of e-mails to the list?  ;)
   
-Matt
   
--- Paulo Soares [EMAIL PROTECTED] wrote:
 setMetadata would need something like
 PdfStamper
   to
 write new content.

 Best Regards,
 Paulo Soares

  -Original Message-
  From: Matt Benson
 [SMTP:[EMAIL PROTECTED]
  Sent: Tuesday, March 25, 2003 15:43
  To: Paulo Soares;
 '[EMAIL PROTECTED]'
  Subject: Re: [iText-questions] New release
 itext-paulo-113
 
  Nice, but out of curiosity, why did you
 decide
   not
 to
  add a corresponding setMetadata method?
 
  -Matt
 
  --- Paulo Soares [EMAIL PROTECTED]
 wrote:
   Changes in itext-paulo-113 (2003-03-25)
  
   - added a new arabic shaper with
 farsi
 support.
  
   - FdfWriter will also output the
 fields
   from
 a
   PdfReader and AcroFields.
  
   - fixed PdfAcroForm for a problem
 when
 creating
   text fields. The /DA key
 was being generated incorrectly.
  
   - added a file attachment
 annotation.
  
   - the subtype for the ink annotation
 was
 wrong.
  
   - modified toPdf() method to write
   directly
 to
   the stream.
   OutputStreamCounter
 was created to aid.
  
   - added ModDate to the info
 dictionary.
  
   - added methods in PdfPTable to set
   absolute
   column widths.
  
   - added PdfReader.getMetadata() to
 get
   the
 XML
   metadata.
  
   - speed improvement in PdfReader.
  
   - fixed a bug in PdfStamperImp when
   stamping
 or
   flattening and the
   original page
 content didn't end in an
 whitespace.
  
   - added the ability to manipulate
   directly
 the
   catalog and the info
   dictionary
 in PdfWriter. Other methods where
 made
 public
   for ease of access to
   low level
 features

Re: [iText-questions] New release itext-paulo-113

2003-03-25 Thread Matt Benson
Nice, but out of curiosity, why did you decide not to
add a corresponding setMetadata method?

-Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 Changes in itext-paulo-113 (2003-03-25)
 
 - added a new arabic shaper with farsi support.
 
 - FdfWriter will also output the fields from a
 PdfReader and AcroFields.
 
 - fixed PdfAcroForm for a problem when creating
 text fields. The /DA key
   was being generated incorrectly.
 
 - added a file attachment annotation.
 
 - the subtype for the ink annotation was wrong.
 
 - modified toPdf() method to write directly to
 the stream.
 OutputStreamCounter
   was created to aid.
 
 - added ModDate to the info dictionary.
 
 - added methods in PdfPTable to set absolute
 column widths.
 
 - added PdfReader.getMetadata() to get the XML
 metadata.
 
 - speed improvement in PdfReader.
 
 - fixed a bug in PdfStamperImp when stamping or
 flattening and the
 original page
   content didn't end in an whitespace.
 
 - added the ability to manipulate directly the
 catalog and the info
 dictionary
   in PdfWriter. Other methods where made public
 for ease of access to
 low level
   features.
 
 
 
 All this at:
 
 http://www.geocities.com/itextpdf
 Mirror at http://itext.execuchoice.net
 
 Best Regards,
 Paulo Soares
 
 
 

---
 This SF.net email is sponsored by:
 The Definitive IT and Networking Event. Be There!
 NetWorld+Interop Las Vegas 2003 -- Register today!

http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] rotation

2003-03-25 Thread Matt Benson
Is there a way to convert a PdfImportedPage to an
Image so that I can avoid duplication of code and use
matrix() to do the calculations for arbitrary
rotations?  Or even if I have to copy code, the array
returned is

[AX, AY, BX, BY, CX, CY, DX, DY]

Do these correspond to a, b, c, and d of THE
Transformation Matrix?  If so, how do I resolve AX 
AY to a, etc?

Thanks,
Matt


--- Paulo Soares [EMAIL PROTECTED] wrote:
 What you have is a translation and a rotation. The
 rotation pivot is always
 the bottom left point of the object. The translation
 makes the object to
 still have the bottom left as the reference. An
 object rotated 90 degrees
 disappears to the left and must be pulled right by
 it's height that now, as
 the object is laying down, counts as the width.
 For arbitrary angles the calculations are the same
 but the angle are
 not -1,0,1. See Image.matrix() for all those
 calculations.
 This is all explained in chapter 4.2 of the PDF
 reference 1.4.
 
 Best Regards,
 Paulo Soares
 - Original Message -
 From: Matt Benson [EMAIL PROTECTED]
 To: itext-questions
 [EMAIL PROTECTED]
 Sent: Thursday, March 20, 2003 21:11
 Subject: [iText-questions] rotation
 
 
  I am using the following values to assist with
  (clockwise) rotation:
 
  90 degrees: 0, -1, 1, 0, 0, rect.height()
  180 degrees: -1, 0, 0, -1, rect.width(),
 rect.height()
  270 degrees: 0, 1, -1, 0, rect.width(), 0
  0/360 degrees: 1, 0, 0, 1, 0, 0
 
  Paulo gave me the values for 90 and 0/360 ages ago
 and
  I played with them until I figured out how to do
 180
  and 270.  These work, but I am having difficulty
  understanding how they fit into the
  cosine-sine-negative sine-cosine instructions in
 the
  tutorial and from Adobe.  What is the formula that
  fits these data and would allow rotation to
 arbitrary
  angles?
 
  Thanks,
  Matt
 
  __
  Do you Yahoo!?
  Yahoo! Platinum - Watch CBS' NCAA March Madness,
 live on your desktop!
  http://platinum.yahoo.com
 
 
 

---
  This SF.net email is sponsored by: Tablet PC.
  Does your code think in ink? You could win a
 Tablet PC.
  Get a free Tablet PC hat just for playing. What
 are you waiting for?
 

http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


RE: [iText-questions] write.os is not visible

2003-03-25 Thread Matt Benson
I had the same problem as Sandy and Bruno. 
Technically, the protected os reference is defined in
com.lowagie.text.  This should be visible within the
package and to subclasses.  Therefore it should not be
visible to PdfBody, and this is consistent with the
error we receive.  However when I try to illustrate
this concept with a simple example, it works as
(un)expected.  I compiled with Sun javac 1.3.1 and
1.4.0 and have not been able to figure out the
difference.

Anyway, I had to patch PdfWriter to get it to work. 
What I did:

1) Modify the super ctor call to wrap os in an
OutputStreamCounter.

2) Add this method to provide access to os and
conveniently cast the OutputStreamCounter:

/** for inner classes */
private OutputStreamCounter getOutputStreamCounter()
{
  return (OutputStreamCounter)os;
}//end getOutputStreamCounter

3) Modify the various modified points in PdfBody.add*
methods' references from writer.os to
writer.getOutputStreamCounter().


--- Paulo Soares [EMAIL PROTECTED] wrote:
 That's a compiler or IDE problem on your part.
 
 The PdfWriter definition is:
 
 public class PdfWriter extends DocWriter
 
 In DocWriter:
 
 protected OutputStreamCounter os;
 
 So, os is visible.
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   Sandy Daum [SMTP:[EMAIL PROTECTED]
  Sent:   Tuesday, March 25, 2003 15:48
  To: [EMAIL PROTECTED]
  Subject:[iText-questions] write.os is not visible
  
  
  
  
  
  I get the following message when I import the
 source from
  itext-paulo-113.zip .
the field writer.os is not visible
  
  Any suggestions?
  
  
  PdfWriter.java
  
 PdfIndirectObject add(PdfObject object)
 throws IOException {
  PdfIndirectObject indirect = new
 PdfIndirectObject(size(),
  object, writer);
  xrefs.add(new
 PdfCrossReference(position));
  indirect.writeTo(writer.os);
  position = writer.os.getCounter();
  return indirect;
  }
  
  
  
  
 

---
  This SF.net email is sponsored by:
  The Definitive IT and Networking Event. Be There!
  NetWorld+Interop Las Vegas 2003 -- Register today!
 

http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

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

---
 This SF.net email is sponsored by:
 The Definitive IT and Networking Event. Be There!
 NetWorld+Interop Las Vegas 2003 -- Register today!

http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] pdf file in IE

2003-03-21 Thread Matt Benson
I think there are two problems:  One, IE wants to know
the size of the PDF as you send it.  This means you
can't write your PDF directly to your
ServletOutputStream.  You have to write to a
ByteArrayOutputStream so that you can set the stream
size on your ServletOutputStream.  The second problem
is that IE sends something like three requests, so you
have to check the headers of the request to find out
whether the entire document is actually being
requested.  The first time I think it is requesting
the content type because this is how it determines
that the Acrobat plugin should be the target for the
file.

-Matt

--- David Thielen [EMAIL PROTECTED] wrote:
 Hi;
 
 I know this has been asked  answered before but I
 never looked at those e-mails before.
 
 What's the scoop on the problem with IE displaying a
 pdf file and what's the work-around?
 
 thanks - dave


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PDF's as Templates

2003-03-21 Thread Matt Benson
Code looks good to me; however judging from the stack
trace I would say that whichever imported page you
tried to add at line 36 of your code was null.  If so,
your problem is not here, but with that PDF.

-Matt

--- Andrew McLaughlin
[EMAIL PROTECTED] wrote:
 Okay, I've been taking a stab at trying to make the
 templated PDF work.  
 However, I'm running into resistance. I'm not
 completely certain that I  
 have set it up properly as I am getting a
 NullPointerException  
 (indicated below). Can someone take a gander at this
 code fragment?
 
  Document document = new Document();
  document.open();
  PdfWriter writer = null;
  PdfReader reader1 = null;
  PdfReader reader2 = null;
  PdfReader reader3 = null;
  writer =
 PdfWriter.getInstance(document, new  
  FileOutputStream(TemplateTest.pdf));
  reader1 = new PdfReader(Picture
 1.pdf);
  reader2 = new PdfReader(Picture
 2.pdf);
  reader3 = new PdfReader(Picture
 3.pdf);
  PdfContentByte cb =
 writer.getDirectContent();
  PdfImportedPage template1 =
 writer.getImportedPage(  
  reader1, 1 );
  PdfImportedPage template2 =
 writer.getImportedPage(  
  reader2, 1 );
  PdfImportedPage template3 =
 writer.getImportedPage(  
  reader3, 1 );
  cb.addTemplate( template1, 100, 100 );
  --  
  NullPointerException reproduced below...
  cb.addTemplate( template2, 200, 200 );
  cb.addTemplate( template3, 300, 300 );
  document.close();
 
 Exception:
 
  java.lang.NullPointerException
  at  
 

com.lowagie.text.pdf.PdfContentByte.addTemplate(PdfContentByte.java:160
 
  0)
  at  
 

com.lowagie.text.pdf.PdfContentByte.addTemplate(PdfContentByte.java:161
 
  9)
  at

com.lowagie.text.pdf.TemplateTest.test(TemplateTest.java:36)
  [snip]
 
 Finally, I'm running the latest version of iText, as
 downloaded from  
 the CVS archive.
 
 TIA!!
 
 Andrew
 
 
 

---
 This SF.net email is sponsored by:Crypto Challenge
 is now open! 
 Get cracking and register here for some mind
 boggling fun and 
 the chance of winning an Apple iPod:

http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] horizontal alignment on keepTogether Paragraphs

2003-03-21 Thread Matt Benson
Never got an answer on this, I apparently had a patch
to PdfDocument that transferred the horizontal
alignment of a keepTogether Paragraph to the wrapping
Table.  Does this work in some other automagic fashion
or does the change need to go into the codebase?

Thanks,
Matt

--- Matt Benson [EMAIL PROTECTED] wrote:
 I was about to sync up with the CVS, and I noticed
 that my version of PdfDocument has a patch to work
 on
 horizontal alignment in Paragraphs that have been
 wrapped in Tables so that they will be kept
 together. 
 Does anyone remember this issue, and know if it
 still
 exists?
 
 -Matt
 
 
 --- Matt Benson [EMAIL PROTECTED] wrote:
  But if all that is needed is just the HTML output,
  it
  seems that it would be possible for a developer to
  define specialized Element implementations and an
  HtmlWriter subclass to add HTML form support. 
 Isn't
  this feasible, even if not readily applicable to
  PDF? 
  In fact, isn't it reasonable to say that if
  PdfAcroForm classes are included in
  com.lowagie.text.pdf then it might also be
  reasonable
  to include similar HTML form classes in
  com.lowagie.text.html?
  
  If so, I might start playing with this.
  
  -Matt
  
  
  --- Bruno [EMAIL PROTECTED] wrote:
   Quoting Paolo Mosna [EMAIL PROTECTED]:
   
Hi everybody,

I'm using iText to generate both HTML and PDF
   documents.
IN HTML I would like to have the possibility
 to
   allow the user to
insert some data using (for example) the HTML
   input tag such as:

input type=text id=name value=userName

If I insert such tag in the HTML template, the
   resulting output document
contains such input tag as a pure text an not
 as
  a
   tag.
How can I solve this problem?
   
   You can't Forms in the HTML specs and Forms in
 the
   PDF specs
   are completely different. There is no easy way
 to
   translate
   a form in HTML to a form in PDF.
   
   Bruno
   
   
  
 

---
   This SF.NET email is sponsored by:
   SourceForge Enterprise Edition + IBM +
 LinuxWorld
  =
   Something 2 See!
   http://www.vasoftware.com
   ___
   iText-questions mailing list
   [EMAIL PROTECTED]
  
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
  
  
  __
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up
  now.
  http://mailplus.yahoo.com
  
  
 

---
  This SF.NET email is sponsored by:
  SourceForge Enterprise Edition + IBM + LinuxWorld
 =
  Something 2 See!
  http://www.vasoftware.com
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up
 now.
 http://mailplus.yahoo.com
 
 

---
 This SF.NET email is sponsored by:
 SourceForge Enterprise Edition + IBM + LinuxWorld =
 Something 2 See!
 http://www.vasoftware.com
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] PDF's as Templates

2003-03-21 Thread Matt Benson
Still, according to that section of code, there are
two places where the NPE could be thrown:  one, at
prs.addXObject() and the other at
template.getIndirectReference().  It looks as though
the PageResources object should have been initialized
down the chain when you called Document.open().  This
appears to be an integral part of PDF output in iText
so I would be very hesitant to think that the problem
lies here.  What if you added in your code these debug
statements:


PdfImportedPage template1
 = writer.getImportedPage(reader1, 1);
PdfImportedPage template2
 = writer.getImportedPage(reader2, 1);
PdfImportedPage template3
 = writer.getImportedPage(reader3, 1);

System.err.println(
 template1= + String.valueOf(template1));
System.err.println(
 template2= + String.valueOf(template2));
System.err.println(
 template3= + String.valueOf(template3));

just for kicks?

-Matt

--- Andrew McLaughlin
[EMAIL PROTECTED] wrote:
 The PDF's, all three, are definitely not null as I
 can view them 
 elsewhere. If I change the filename and rerun, I get
 a 
 FileNotFoundException so I know I'm hooking up the
 right PDF's.
 
 According to that section of code, it appears that
 the PageResources 
 has not been initialized, to wit:
 
  public void addTemplate(PdfTemplate template,
 float a, float b, 
  float c, float d, float e, float f) {
  checkWriter();
  checkNoPattern(template);
  PdfName name =
 writer.addDirectTemplateSimple(template);
  PageResources prs = getPageResources();
  name = prs.addXObject(name,
 template.getIndirectReference());  
-- NullPointerException...
 
 So I'm wondering if maybe there's one more method
 call I should be 
 doing to get a PageResources object hooked up... :)
 
 Andrew
 
 
 On Friday, March 21, 2003, at 12:06  PM, Matt Benson
 wrote:
 
  Code looks good to me; however judging from the
 stack
  trace I would say that whichever imported page you
  tried to add at line 36 of your code was null.  If
 so,
  your problem is not here, but with that PDF.
 
  -Matt
 
  --- Andrew McLaughlin
  [EMAIL PROTECTED] wrote:
  Okay, I've been taking a stab at trying to make
 the
  templated PDF work.
  However, I'm running into resistance. I'm not
  completely certain that I
  have set it up properly as I am getting a
  NullPointerException
  (indicated below). Can someone take a gander at
 this
  code fragment?
 
  Document document = new Document();
  document.open();
  PdfWriter writer = null;
  PdfReader reader1 = null;
  PdfReader reader2 = null;
  PdfReader reader3 = null;
  writer =
  PdfWriter.getInstance(document, new
  FileOutputStream(TemplateTest.pdf));
  reader1 = new PdfReader(Picture
  1.pdf);
  reader2 = new PdfReader(Picture
  2.pdf);
  reader3 = new PdfReader(Picture
  3.pdf);
  PdfContentByte cb =
  writer.getDirectContent();
  PdfImportedPage template1 =
  writer.getImportedPage(
  reader1, 1 );
  PdfImportedPage template2 =
  writer.getImportedPage(
  reader2, 1 );
  PdfImportedPage template3 =
  writer.getImportedPage(
  reader3, 1 );
  cb.addTemplate( template1, 100, 100
 );
   --
  NullPointerException reproduced below...
  cb.addTemplate( template2, 200, 200
 );
  cb.addTemplate( template3, 300, 300
 );
  document.close();
 
  Exception:
 
  java.lang.NullPointerException
at
 
 
 

com.lowagie.text.pdf.PdfContentByte.addTemplate(PdfContentByte.java:160
 
  0)
at
 
 
 

com.lowagie.text.pdf.PdfContentByte.addTemplate(PdfContentByte.java:161
 
  9)
at
 
 

com.lowagie.text.pdf.TemplateTest.test(TemplateTest.java:36)
  [snip]
 
  Finally, I'm running the latest version of iText,
 as
  downloaded from
  the CVS archive.
 
  TIA!!
 
  Andrew
 
 
 
 
 

---
  This SF.net email is sponsored by:Crypto
 Challenge
  is now open!
  Get cracking and register here for some mind
  boggling fun and
  the chance of winning an Apple iPod:
 
 

http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 
 

https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 
  __
  Do you Yahoo!?
  Yahoo! Platinum - Watch CBS' NCAA March Madness,
 live on your desktop!
  http://platinum.yahoo.com
 
 
 

---
  This SF.net email is sponsored by:Crypto Challenge
 is now open!
  Get cracking and register here for some mind
 boggling fun and
  the chance of winning an Apple iPod:
 

http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
  ___
  iText-questions mailing list
  [EMAIL PROTECTED]
 

https://lists.sourceforge.net

Re: [iText-questions] PDF's as Templates

2003-03-21 Thread Matt Benson
Wow, I have no explanation for that!  Wiser heads than
mine will have to address this.  Sorry for my earlier
doubt but you can understand my reasoning...

-Matt

--- Andrew McLaughlin
[EMAIL PROTECTED] wrote:
 I ran the thing under debug and know for a fact that
 it is prs which is 
 null and not template. :) Keep in mind the template
 is the one I 
 created from the get go... :) Here's a screen shot
 showing the state of 
 the debugger right before it executes that line.
 Note that prs is null 
 whereas template is loaded... :)
 
 

 ATTACHMENT part 2 application/pdf
x-mac-hide-extension=yes; x-mac-creator=3F3F3F3F;
x-unix-mode=0644; x-mac-type=50444620; name=Picture
1.pdf
 
 
 TIA! :)
 
 Andrew
 
 
 On Friday, March 21, 2003, at 02:20  PM, Matt Benson
 wrote:
 
  Still, according to that section of code, there
 are
  two places where the NPE could be thrown:  one, at
  prs.addXObject() and the other at
  template.getIndirectReference().  It looks as
 though
  the PageResources object should have been
 initialized
  down the chain when you called Document.open(). 
 This
  appears to be an integral part of PDF output in
 iText
  so I would be very hesitant to think that the
 problem
  lies here.  What if you added in your code these
 debug
  statements:
 
 
  PdfImportedPage template1
   = writer.getImportedPage(reader1, 1);
  PdfImportedPage template2
   = writer.getImportedPage(reader2, 1);
  PdfImportedPage template3
   = writer.getImportedPage(reader3, 1);
 
  System.err.println(
   template1= + String.valueOf(template1));
  System.err.println(
   template2= + String.valueOf(template2));
  System.err.println(
   template3= + String.valueOf(template3));
 
  just for kicks?
 
  -Matt
 
  --- Andrew McLaughlin
  [EMAIL PROTECTED] wrote:
  The PDF's, all three, are definitely not null as
 I
  can view them
  elsewhere. If I change the filename and rerun, I
 get
  a
  FileNotFoundException so I know I'm hooking up
 the
  right PDF's.
 
  According to that section of code, it appears
 that
  the PageResources
  has not been initialized, to wit:
 
  public void addTemplate(PdfTemplate
 template,
  float a, float b,
  float c, float d, float e, float f) {
  checkWriter();
  checkNoPattern(template);
  PdfName name =
  writer.addDirectTemplateSimple(template);
  PageResources prs = getPageResources();
  name = prs.addXObject(name,
  template.getIndirectReference());
-- NullPointerException...
 
  So I'm wondering if maybe there's one more method
  call I should be
  doing to get a PageResources object hooked up...
 :)
 
  Andrew
 
 
  On Friday, March 21, 2003, at 12:06  PM, Matt
 Benson
  wrote:
 
  Code looks good to me; however judging from the
  stack
  trace I would say that whichever imported page
 you
  tried to add at line 36 of your code was null. 
 If
  so,
  your problem is not here, but with that PDF.
 
  -Matt
 
  --- Andrew McLaughlin
  [EMAIL PROTECTED] wrote:
  Okay, I've been taking a stab at trying to make
  the
  templated PDF work.
  However, I'm running into resistance. I'm not
  completely certain that I
  have set it up properly as I am getting a
  NullPointerException
  (indicated below). Can someone take a gander at
  this
  code fragment?
 
  Document document = new
 Document();
  document.open();
  PdfWriter writer = null;
  PdfReader reader1 = null;
  PdfReader reader2 = null;
  PdfReader reader3 = null;
  writer =
  PdfWriter.getInstance(document, new
  FileOutputStream(TemplateTest.pdf));
  reader1 = new PdfReader(Picture
  1.pdf);
  reader2 = new PdfReader(Picture
  2.pdf);
  reader3 = new PdfReader(Picture
  3.pdf);
  PdfContentByte cb =
  writer.getDirectContent();
  PdfImportedPage template1 =
  writer.getImportedPage(
  reader1, 1 );
  PdfImportedPage template2 =
  writer.getImportedPage(
  reader2, 1 );
  PdfImportedPage template3 =
  writer.getImportedPage(
  reader3, 1 );
  cb.addTemplate( template1, 100,
 100
  );
   --
  NullPointerException reproduced below...
  cb.addTemplate( template2, 200,
 200
  );
  cb.addTemplate( template3, 300,
 300
  );
  document.close();
 
  Exception:
 
  java.lang.NullPointerException
  at
 
 
 
 
 

com.lowagie.text.pdf.PdfContentByte.addTemplate(PdfContentByte.java:160
 
  0)
  at
 
 
 
 
 

com.lowagie.text.pdf.PdfContentByte.addTemplate(PdfContentByte.java:161
 
  9)
  at
 
 
 
 

com.lowagie.text.pdf.TemplateTest.test(TemplateTest.java:36)
  [snip]
 
  Finally, I'm running the latest version of
 iText,
  as
  downloaded from
  the CVS archive.
 
  TIA!!
 
  Andrew
 
 
 
 
 
 
 

---
  This SF.net email is sponsored by:Crypto
  Challenge
 
=== message truncated

Re: [iText-questions] PDF to TIFF

2003-03-20 Thread Matt Benson
In fairness, won't ImageMagick use ghostScript to make
this conversion?

-Matt

--- Leonard Rosenthol [EMAIL PROTECTED] wrote:
 At 01:32 PM 3/20/2003 +0100, David Nielsen wrote:
 How do i create a tiff image of the pdf pagees in a
 file.
 what i need is to know how to convert a pdf page to
 a tiff image,
 
  JPEDAL - http://www.jpedal.org
  ImageMagick - http://www.imagemagick.org
 
 
 Leonard

---
 Leonard Rosenthol   
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
 
 
 

---
 This SF.net email is sponsored by: Tablet PC.  
 Does your code think in ink? You could win a Tablet
 PC. 
 Get a free Tablet PC hat just for playing. What are
 you waiting for? 

http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] rotation

2003-03-20 Thread Matt Benson
I am using the following values to assist with
(clockwise) rotation:

90 degrees: 0, -1, 1, 0, 0, rect.height()
180 degrees: -1, 0, 0, -1, rect.width(), rect.height()
270 degrees: 0, 1, -1, 0, rect.width(), 0
0/360 degrees: 1, 0, 0, 1, 0, 0

Paulo gave me the values for 90 and 0/360 ages ago and
I played with them until I figured out how to do 180
and 270.  These work, but I am having difficulty
understanding how they fit into the
cosine-sine-negative sine-cosine instructions in the
tutorial and from Adobe.  What is the formula that
fits these data and would allow rotation to arbitrary
angles?

Thanks,
Matt

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: Fw: [iText-questions] Convert PDF into HTML

2003-03-18 Thread Matt Benson
Don't forget what ghostScript offers in the way of
simple text extraction.  Simpler to use than JPedal
but not Java, either...

-Matt

--- Leonard Rosenthol [EMAIL PROTECTED] wrote:
 At 10:17 AM -0300 3/18/03, Thiago Costa wrote:
 Can i extract the plain text ?
 
 
   No.
 
   If you want text extraction or format conversion -
 check out 
 JPEDAL (http://www.jpedal.org).
 
 
 Leonard
 -- 

---
 Leonard Rosenthol   
 mailto:[EMAIL PROTECTED]
 Chief Technical Officer 
 http://www.pdfsages.com
 PDF Sages, Inc. 
 215-629-3700 (voice)
  
 215-629-0789 (fax)
 
 

---
 This SF.net email is sponsored by: Does your code
 think in ink? 
 You could win a Tablet PC. Get a free Tablet PC hat
 just for playing. 
 What are you waiting for?

http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
 ___
 iText-questions mailing list
 [EMAIL PROTECTED]

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


---
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Is 0.97 safe to use?

2003-03-17 Thread Matt Benson
I believe they were just build issues, were they not?

I'm fine, but I'm currently using only a small subset
of functionality...

-Matt

--- David Thielen [EMAIL PROTECTED] wrote:
 Hi;
 
 Did the problems people had with 0.97 all get fixed?
 
 thanks - dave


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com


---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
Oops.  :)  Okay, thanks for the solution, Paulo!

-Matt


--- Paulo Soares [EMAIL PROTECTED] wrote:
 And now you have a stream as a direct object, which
 is illegal.
 
 Best Regards,
 Paulo Soares
 
 - Original Message -
 From: Matt Benson [EMAIL PROTECTED]
 To: Paulo Soares [EMAIL PROTECTED];
 itext-questions
 [EMAIL PROTECTED]
 Sent: Wednesday, March 12, 2003 23:11
 Subject: RE: [iText-questions] modifying metadata
 
 
  Okay, I think I found it.  Of course using
 PRStream
  wouldn't be any better than PdfStream because
 PRStream
  extends PdfStream and doesn't override toPdf().
  PdfStream.toPdf() is implemented as always
 returning
  null.  I didn't know why that should be, so I
 changed
  it.  It was:
 
  public byte[] toPdf(PdfWriter writer) {
  dicBytes = super.toPdf(writer);
  return null;
  }
 
  but I changed it to:
 
  public byte[] toPdf(PdfWriter writer) {
  dicBytes = super.toPdf(writer);
  return dicBytes;
  }
 
  and it seems to work now.
 
 
  -Matt
 
  --- Matt Benson [EMAIL PROTECTED] wrote:
   One obvious problem is that this example was
 using
   PdfStream, which always returns null from toPdf.
   However, I had already been using PRStream
 before
   that
   with the same results.  I am going back to
 PRStream
   in
   the debugging to which I have been forced to
 turn,
   due
   to the terrible problem of time zones!  :)
  
  
  
   --- Matt Benson [EMAIL PROTECTED] wrote:
Okay, I am STUCK.  I can play with XMP/RDF,
 that's
fine, and I've been doing it.  But I am
 finding
myself
unable to actually change the metadata of a
 given
PDF.
 I have culled together a fairly short
 example;
   can
anyone see any obvious problems?
   
   
import java.io.FileOutputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
   
import com.lowagie.text.pdf.PdfName;
import com.lowagie.text.pdf.PRStream;
import com.lowagie.text.pdf.PdfObject;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfStream;
import com.lowagie.text.pdf.PdfStamper;
import com.lowagie.text.pdf.PdfDictionary;
   
   
public class MinimalModifyPdfMetadata
{
   
  public byte[] modifyMetadata(String pdf)
   throws Exception
  {
ByteArrayOutputStream baos = new
ByteArrayOutputStream();
   
PdfReader pdfReader = new PdfReader(pdf);
byte[] b =
   
  
 

PdfReader.getStreamBytes((PRStream)(PdfReader.getPdfObject(
 pdfReader.getCatalog().get(new
PdfName(Metadata,
 pdfReader.getSafeFile());
   
System.out.println(original metadata);
System.out.println(new String(b));
   
PdfStamper stamp = new
 PdfStamper(pdfReader,
baos);
   
//set the metadata
pdfReader.getCatalog().put(new
PdfName(Metadata), new PdfStream(b));
   
try
{
  stamp.close();
}//end try
catch (Exception ex)
{
  ex.printStackTrace(System.err);
}//end catch Exception
   
return baos.toByteArray();
  }//end modifyMetadata
   
   
  public static void main(String[] args)
   throws Exception
  {
int code = 0;
   
if (args.length  1)
{
  BufferedOutputStream bos
   = new BufferedOutputStream(new
FileOutputStream(args[1]));
   
  bos.write(new
   
  
 MinimalModifyPdfMetadata().modifyMetadata(args[0]));
  bos.close();
}//end if at least 2 args
else
{
  System.err.println(
   Usage:  MinimalModifyPdfMetadata
   input-file
output-file);
}//end else, wrong # of args
   
System.exit(code);
  }//end main
   
}//end class MinimalModifyPdfMetadata
   
   
I get the following stack trace when I run the
   above
code:
   
java.lang.NullPointerException
at
   
 java.io.OutputStream.write(OutputStream.java:65)
at
   
  
 

com.lowagie.text.pdf.PdfDictionary.toPdf(PdfDictionary.java:152)
at
   
  
 

com.lowagie.text.pdf.PdfIndirectObject.init(PdfIndirectObject.java:
138)
at
   
  
 

com.lowagie.text.pdf.PdfIndirectObject.init(PdfIndirectObject.java:
107)
at
   
  
 

com.lowagie.text.pdf.PdfWriter$PdfBody.add(PdfWriter.java:255)
at
   
  
 

com.lowagie.text.pdf.PdfWriter.addToBody(PdfWriter.java:1361)
at
   
  
 

com.lowagie.text.pdf.PdfStamperImp.close(PdfStamperImp.java:107)
 
=== message truncated ===


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com


---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi

Re: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
Except that when I tried your solution, I found that
PdfIndirectReference and PdfWriter.addToBody() are
both package-private so I can't get to them without
modifying the library... :(

-Matt

--- Matt Benson [EMAIL PROTECTED] wrote:
 Oops.  :)  Okay, thanks for the solution, Paulo!
 
 -Matt
 
 
 --- Paulo Soares [EMAIL PROTECTED] wrote:
  And now you have a stream as a direct object,
 which
  is illegal.
  
  Best Regards,
  Paulo Soares
  
  - Original Message -
  From: Matt Benson [EMAIL PROTECTED]
  To: Paulo Soares [EMAIL PROTECTED];
  itext-questions
  [EMAIL PROTECTED]
  Sent: Wednesday, March 12, 2003 23:11
  Subject: RE: [iText-questions] modifying metadata
  
  
   Okay, I think I found it.  Of course using
  PRStream
   wouldn't be any better than PdfStream because
  PRStream
   extends PdfStream and doesn't override toPdf().
   PdfStream.toPdf() is implemented as always
  returning
   null.  I didn't know why that should be, so I
  changed
   it.  It was:
  
   public byte[] toPdf(PdfWriter writer) {
   dicBytes = super.toPdf(writer);
   return null;
   }
  
   but I changed it to:
  
   public byte[] toPdf(PdfWriter writer) {
   dicBytes = super.toPdf(writer);
   return dicBytes;
   }
  
   and it seems to work now.
  
  
   -Matt
  
   --- Matt Benson [EMAIL PROTECTED] wrote:
One obvious problem is that this example was
  using
PdfStream, which always returns null from
 toPdf.
However, I had already been using PRStream
  before
that
with the same results.  I am going back to
  PRStream
in
the debugging to which I have been forced to
  turn,
due
to the terrible problem of time zones!  :)
   
   
   
--- Matt Benson [EMAIL PROTECTED] wrote:
 Okay, I am STUCK.  I can play with XMP/RDF,
  that's
 fine, and I've been doing it.  But I am
  finding
 myself
 unable to actually change the metadata of a
  given
 PDF.
  I have culled together a fairly short
  example;
can
 anyone see any obvious problems?


 import java.io.FileOutputStream;
 import java.io.BufferedOutputStream;
 import java.io.ByteArrayOutputStream;

 import com.lowagie.text.pdf.PdfName;
 import com.lowagie.text.pdf.PRStream;
 import com.lowagie.text.pdf.PdfObject;
 import com.lowagie.text.pdf.PdfReader;
 import com.lowagie.text.pdf.PdfStream;
 import com.lowagie.text.pdf.PdfStamper;
 import com.lowagie.text.pdf.PdfDictionary;


 public class MinimalModifyPdfMetadata
 {

   public byte[] modifyMetadata(String pdf)
throws Exception
   {
 ByteArrayOutputStream baos = new
 ByteArrayOutputStream();

 PdfReader pdfReader = new
 PdfReader(pdf);
 byte[] b =

   
  
 

PdfReader.getStreamBytes((PRStream)(PdfReader.getPdfObject(
  pdfReader.getCatalog().get(new
 PdfName(Metadata,
  pdfReader.getSafeFile());

 System.out.println(original metadata);
 System.out.println(new String(b));

 PdfStamper stamp = new
  PdfStamper(pdfReader,
 baos);

 //set the metadata
 pdfReader.getCatalog().put(new
 PdfName(Metadata), new PdfStream(b));

 try
 {
   stamp.close();
 }//end try
 catch (Exception ex)
 {
   ex.printStackTrace(System.err);
 }//end catch Exception

 return baos.toByteArray();
   }//end modifyMetadata


   public static void main(String[] args)
throws Exception
   {
 int code = 0;

 if (args.length  1)
 {
   BufferedOutputStream bos
= new BufferedOutputStream(new
 FileOutputStream(args[1]));

   bos.write(new

   
 
 MinimalModifyPdfMetadata().modifyMetadata(args[0]));
   bos.close();
 }//end if at least 2 args
 else
 {
   System.err.println(
Usage:  MinimalModifyPdfMetadata
input-file
 output-file);
 }//end else, wrong # of args

 System.exit(code);
   }//end main

 }//end class MinimalModifyPdfMetadata


 I get the following stack trace when I run
 the
above
 code:

 java.lang.NullPointerException
 at

  java.io.OutputStream.write(OutputStream.java:65)
 at

   
  
 

com.lowagie.text.pdf.PdfDictionary.toPdf(PdfDictionary.java:152)
 at

   
  
 

com.lowagie.text.pdf.PdfIndirectObject.init(PdfIndirectObject.java:
 138)
 at

   
  
 

com.lowagie.text.pdf.PdfIndirectObject.init(PdfIndirectObject.java:
 
=== message truncated ===


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com


---
This SF.net email is sponsored

RE: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
I'll modify as long as I know I can have them by the
time I go to production, which shouldn't be until
July...

Thanks,
Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 They will be public in the next version together
 with some others. If you
 don't want to mess with the library put your code in
 the package
 com.lowagie.text.pdf.
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   Matt Benson [SMTP:[EMAIL PROTECTED]
  Sent:   Thursday, March 13, 2003 15:36
  To: Paulo Soares; itext-questions
  Subject:Re: [iText-questions] modifying metadata
  
  Except that when I tried your solution, I found
 that
  PdfIndirectReference and PdfWriter.addToBody() are
  both package-private so I can't get to them
 without
  modifying the library... :(
  
  -Matt
  
  --- Matt Benson [EMAIL PROTECTED] wrote:
   Oops.  :)  Okay, thanks for the solution, Paulo!
   
   -Matt
   
   
   --- Paulo Soares [EMAIL PROTECTED] wrote:
And now you have a stream as a direct object,
   which
is illegal.

Best Regards,
Paulo Soares

- Original Message -
From: Matt Benson [EMAIL PROTECTED]
To: Paulo Soares [EMAIL PROTECTED];
itext-questions
[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 23:11
Subject: RE: [iText-questions] modifying
 metadata


 Okay, I think I found it.  Of course using
PRStream
 wouldn't be any better than PdfStream
 because
PRStream
 extends PdfStream and doesn't override
 toPdf().
 PdfStream.toPdf() is implemented as always
returning
 null.  I didn't know why that should be, so
 I
changed
 it.  It was:

 public byte[] toPdf(PdfWriter writer) {
 dicBytes = super.toPdf(writer);
 return null;
 }

 but I changed it to:

 public byte[] toPdf(PdfWriter writer) {
 dicBytes = super.toPdf(writer);
 return dicBytes;
 }

 and it seems to work now.


 -Matt

 --- Matt Benson [EMAIL PROTECTED]
 wrote:
  One obvious problem is that this example
 was
using
  PdfStream, which always returns null from
   toPdf.
  However, I had already been using PRStream
before
  that
  with the same results.  I am going back to
PRStream
  in
  the debugging to which I have been forced
 to
turn,
  due
  to the terrible problem of time zones!  :)
 
 
 
  --- Matt Benson [EMAIL PROTECTED]
 wrote:
   Okay, I am STUCK.  I can play with
 XMP/RDF,
that's
   fine, and I've been doing it.  But I am
finding
   myself
   unable to actually change the metadata
 of a
given
   PDF.
I have culled together a fairly short
example;
  can
   anyone see any obvious problems?
  
  
   import java.io.FileOutputStream;
   import java.io.BufferedOutputStream;
   import java.io.ByteArrayOutputStream;
  
   import com.lowagie.text.pdf.PdfName;
   import com.lowagie.text.pdf.PRStream;
   import com.lowagie.text.pdf.PdfObject;
   import com.lowagie.text.pdf.PdfReader;
   import com.lowagie.text.pdf.PdfStream;
   import com.lowagie.text.pdf.PdfStamper;
   import
 com.lowagie.text.pdf.PdfDictionary;
  
  
   public class MinimalModifyPdfMetadata
   {
  
 public byte[] modifyMetadata(String
 pdf)
  throws Exception
 {
   ByteArrayOutputStream baos = new
   ByteArrayOutputStream();
  
   PdfReader pdfReader = new
   PdfReader(pdf);
   byte[] b =
  
 

   
  
 

PdfReader.getStreamBytes((PRStream)(PdfReader.getPdfObject(
pdfReader.getCatalog().get(new
   PdfName(Metadata,
pdfReader.getSafeFile());
  
   System.out.println(original
 metadata);
   System.out.println(new String(b));
  
   PdfStamper stamp = new
PdfStamper(pdfReader,
   baos);
  
   //set the metadata
   pdfReader.getCatalog().put(new
   PdfName(Metadata), new PdfStream(b));
  
   try
   {
 stamp.close();
   }//end try
   catch (Exception ex)
   {
 ex.printStackTrace(System.err);
   }//end catch Exception
  
   return baos.toByteArray();
 }//end modifyMetadata
  
  
 public static void main(String[] args)
  throws Exception
 {
   int code = 0;
  
   if (args.length  1)
   {
 BufferedOutputStream bos
  = new BufferedOutputStream(new
   FileOutputStream(args[1]));
  
 bos.write(new
  
 
   
  
 MinimalModifyPdfMetadata().modifyMetadata(args[0]));
 bos.close();
   }//end if at least 2 args
   else
 
=== message truncated ===


__
Do you

RE: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
Wait!  You lost me... what?

-Matt

--- Paulo Soares [EMAIL PROTECTED] wrote:
 Well, I'll do even better (this sounds like those TV
 commercials to sell
 super frying pans), I'll add insertion/extraction of
 metadata in the library
 and you'll also get (some form) of PDF/X
 compatibility for free.
 
 Best Regards,
 Paulo Soares
 
  -Original Message-
  From:   Matt Benson [SMTP:[EMAIL PROTECTED]
  Sent:   Thursday, March 13, 2003 15:42
  To: Paulo Soares; itext-questions
  Subject:RE: [iText-questions] modifying metadata
  
  I'll modify as long as I know I can have them by
 the
  time I go to production, which shouldn't be until
  July...
  
  Thanks,
  Matt
  
  --- Paulo Soares [EMAIL PROTECTED] wrote:
   They will be public in the next version together
   with some others. If you
   don't want to mess with the library put your
 code in
   the package
   com.lowagie.text.pdf.
   
   Best Regards,
   Paulo Soares
   
-Original Message-
From:   Matt Benson [SMTP:[EMAIL PROTECTED]
Sent:   Thursday, March 13, 2003 15:36
To: Paulo Soares; itext-questions
Subject:Re: [iText-questions] modifying
 metadata

Except that when I tried your solution, I
 found
   that
PdfIndirectReference and PdfWriter.addToBody()
 are
both package-private so I can't get to them
   without
modifying the library... :(

-Matt

--- Matt Benson [EMAIL PROTECTED] wrote:
 Oops.  :)  Okay, thanks for the solution,
 Paulo!
 
 -Matt
 
 
 --- Paulo Soares [EMAIL PROTECTED]
 wrote:
  And now you have a stream as a direct
 object,
 which
  is illegal.
  
  Best Regards,
  Paulo Soares
  
  - Original Message -
  From: Matt Benson [EMAIL PROTECTED]
  To: Paulo Soares [EMAIL PROTECTED];
  itext-questions
  [EMAIL PROTECTED]
  Sent: Wednesday, March 12, 2003 23:11
  Subject: RE: [iText-questions] modifying
   metadata
  
  
   Okay, I think I found it.  Of course
 using
  PRStream
   wouldn't be any better than PdfStream
   because
  PRStream
   extends PdfStream and doesn't override
   toPdf().
   PdfStream.toPdf() is implemented as
 always
  returning
   null.  I didn't know why that should be,
 so
   I
  changed
   it.  It was:
  
   public byte[] toPdf(PdfWriter
 writer) {
   dicBytes = super.toPdf(writer);
   return null;
   }
  
   but I changed it to:
  
   public byte[] toPdf(PdfWriter
 writer) {
   dicBytes = super.toPdf(writer);
   return dicBytes;
   }
  
   and it seems to work now.
  
  
   -Matt
  
   --- Matt Benson [EMAIL PROTECTED]
   wrote:
One obvious problem is that this
 example
   was
  using
PdfStream, which always returns null
 from
 toPdf.
However, I had already been using
 PRStream
  before
that
with the same results.  I am going
 back to
  PRStream
in
the debugging to which I have been
 forced
   to
  turn,
due
to the terrible problem of time zones!
  :)
   
   
   
--- Matt Benson [EMAIL PROTECTED]
   wrote:
 Okay, I am STUCK.  I can play with
   XMP/RDF,
  that's
 fine, and I've been doing it.  But I
 am
  finding
 myself
 unable to actually change the
 metadata
   of a
  given
 PDF.
  I have culled together a fairly
 short
  example;
can
 anyone see any obvious problems?


 import java.io.FileOutputStream;
 import java.io.BufferedOutputStream;
 import
 java.io.ByteArrayOutputStream;

 import com.lowagie.text.pdf.PdfName;
 import
 com.lowagie.text.pdf.PRStream;
 import
 com.lowagie.text.pdf.PdfObject;
 import
 com.lowagie.text.pdf.PdfReader;
 import
 com.lowagie.text.pdf.PdfStream;
 import
 com.lowagie.text.pdf.PdfStamper;
 import
   com.lowagie.text.pdf.PdfDictionary;


 public class
 MinimalModifyPdfMetadata
 {

   public byte[]
 modifyMetadata(String
   pdf)
throws Exception
   {
 ByteArrayOutputStream baos = new
 ByteArrayOutputStream();

 PdfReader pdfReader = new
 PdfReader(pdf);
 byte[] b =

   
 
=== message truncated ===


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com


---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl

  1   2   3   >