Re: [iText-questions] feed XML file to PDF form

2010-12-23 Thread 1T3XT BVBA

Op 22/12/2010 20:58, Youssef Nokta schreef:
Thank you for responding. I have subscribed to the mailing list now. I 
just orderd the book from Amazon so it should be here in a couple of 
days. Is page 275 referring the examples described in chapter 8? Thanks.

Yes: http://1t3xt.be/?116

There's a known issue with fillXfaForm and some XFA forms
that was solved either in the most recent iText version, or
in the version in the SVN repository (I don't remember if
the fix was already released or not).
--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] Unmodifiable radiobuttons/checkboxes in table cell

2010-12-23 Thread 1T3XT BVBA
Op 23/12/2010 8:41, Johannes Becker schreef:
 private class RadioRectangle implements PdfPCellEvent
 {
  public void cellLayout(PdfPCell cell, Rectangle rect,   PdfContentByte[] 
 canvas)
  {
// dont know what to do
Get the PdfWriter instance from one of the canvases (for instance 
canvas[0].getWriter()).
The coordinates of the cell are stored in rect.
With these parameters, it's just a matter of creating the checkbox as is 
done in the book.
Please read chapter 8 for more info.
  }
 }


--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Unmodifiable radiobuttons/checkboxes in table cell

2010-12-23 Thread Johannes Becker
Hi,

thanks for the quick response.

  Please read chapter 8 for more info.
My problem is that im working with the 2007 book. :(

  The coordinates of the cell are stored in rect.
  With these parameters, it's just a matter of creating the checkbox as is
  done in the book.
My problem is, that I quite don't get the connection between the PdfPCellEvent 
and
how to add a RadioCheckField into my cell.

More precise:
I dont't know how to get the rect out of the PdfPCellEvent, to dynamically
create a RadioCheckFields within the table. I guess I'm missing something here.

Thanks
Jonny



Am 23.12.2010 09:29, schrieb 1T3XT BVBA:
 Op 23/12/2010 8:41, Johannes Becker schreef:
 private class RadioRectangle implements PdfPCellEvent
 {
   public void cellLayout(PdfPCell cell, Rectangle rect,   
 PdfContentByte[] canvas)
   {
 // dont know what to do
 Get the PdfWriter instance from one of the canvases (for instance
 canvas[0].getWriter()).
 The coordinates of the cell are stored in rect.
 With these parameters, it's just a matter of creating the checkbox as is
 done in the book.
 Please read chapter 8 for more info.
   }
 }

 --
 Learn how Oracle Real Application Clusters (RAC) One Node allows customers
 to consolidate database storage, standardize their database environment, and,
 should the need arise, upgrade to a full multi-node Oracle RAC database
 without downtime or disruption
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions

 Many questions posted to this list can (and will) be answered with a 
 reference to the iText book: http://www.itextpdf.com/book/
 Please check the keywords list before you ask for examples: 
 http://itextpdf.com/themes/keywords.php



--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] Unmodifiable radiobuttons/checkboxes in table cell

2010-12-23 Thread 1T3XT BVBA
Op 23/12/2010 10:25, Johannes Becker schreef:
   Please read chapter 8 for more info.
 My problem is that im working with the 2007 book. :(
Read on until you reach p490.
There's a code sample on that page that shows how to:
 get the connection between the PdfPCellEvent and
 how to add a RadioCheckField into my cell.
Actually, the code sample adds a TextField, not a RadioCheckField,
but it's easy to adapt the example.
 More precise:
 I dont't know how to get the rect out of the PdfPCellEvent, to dynamically
 create a RadioCheckFields within the table. I guess I'm missing something 
 here.
As I explained in my previous answer:
 The coordinates of the cell are stored in rect.
If I misinterpreted your question, and if you mean you don't understand 
how cell events work, read section 10.2.2 in the First Edition of iText 
in Action (that's the 2007 book).

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


[iText-questions] How can i set Master Password to No for a PDF

2010-12-23 Thread nkumarkv

Hi,
I am encrypting a PDF (disabling copy and modify) using PdfStamper
SetEncyption method. I am passing null to both User and Master password
parameters of this method. But when i open the encrypted PDF i still see
Master Password set as Yes. As per the guide if Master Password is null it
is set to some random value by SetEncryption. But i dont want this to
happen. Because with this i will not be able to merge the resulting pdf
files.I want this Master Password to be set to No. Is it possible to
encrypt a pdf file without the Master Password ?? how can i set Master
Password to No ? 

Thanks,
Naveen
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/How-can-i-set-Master-Password-to-No-for-a-PDF-tp3161813p3161813.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] How can i set Master Password to No for a PDF

2010-12-23 Thread 1T3XT BVBA
Op 23/12/2010 10:09, nkumarkv schreef:
 Hi,
 I am encrypting a PDF (disabling copy and modify) using PdfStamper
 SetEncyption method. I am passing null to both User and Master password
 parameters of this method. But when i open the encrypted PDF i still see
 Master Password set as Yes. As per the guide if Master Password is null it
 is set to some random value by SetEncryption.
That's correct.
   But i dont want this to
 happen. Because with this i will not be able to merge the resulting pdf
 files.I want this Master Password to be set to No. Is it possible to
 encrypt a pdf file without the Master Password ??
Why do you want to encrypt the PDF? Because you want to set a user password?
That doesn't make sense if you don't provide an owner password.
Every user would be able to open the document which defies the purpose 
of having a user password.
   how can i set Master
 Password to No ?
You don't. Use a master password you know, and use that password when 
you want to merge the PDF documents.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] how to remove embedded font stream

2010-12-23 Thread Mark Storer
Okay, IF the font's encoding is not Identity-H, you can often (but not
always) get away with removing the font stream.

Step 0:  Get the font resource dictionary.
Step 1:  Get the font descriptor dictionary.
Step 2:  Remove the following keys (only one will be present)
PdfName.FONTFILE
PdfName.FONTFILE2
PdfName.FONTFILE3

That's it.


The font resource dictionary will have an entry, PdName.ENCODING.  If
that entry is a PdfString, it'll be a standard encoding (they all end
with Encoding), the name of a Cmap (no particular standard naming), a
stream, or a dictionary.  The only thing you REALLY need to worry about
are the strings that begin with Identity- (Identity-H and Identity-V),
and the streams (custom Cmaps built for that font).

Stripping the embedding from a font with one of the above Danger Signs
will result in text that cannot be extracted outside of OCR (Optical
Character Recognition).

In any event, you can end up with text that Looks Awful.  If you're
willing to accept that risk, then go for it.


Replacing a font is likely to produce something that Looks Horrifically
Awful unless you rebuild the content stream for that new font.  This
would be extraordinarily challenging for a PDF Expert, and is for all
intents and purposes impossible for someone who is not.

To get some idea of why this is so, I suggest you google the words
kerning and ligatures, as separate searches... Two different topics.


--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
import legalese.Disclaimer;
DisclaimerCardiff DisCard = null;
 
 

 -Original Message-
 From: Leonard Rosenthol [mailto:lrose...@adobe.com] 
 Sent: Wednesday, December 22, 2010 8:52 PM
 To: itext-questions@lists.sourceforge.net
 Subject: Re: [iText-questions] how to remove embedded font stream
 
 No, there is no sample code and it's NOT a trivial exercise.
 
 Embedded fonts are the proper way to do things.  Removing 
 them doesn't solve any problems - it only introduces new ones.
 
 -Original Message-
 From: zhouxiang [mailto:344819...@qq.com]
 Sent: Wednesday, December 22, 2010 10:21 PM
 To: itext-questions@lists.sourceforge.net
 Subject: Re: [iText-questions] how to remove embedded font stream
 
 
 hi,1T3XT BVBA,thanks for your kind reply.
 i'm new to itext ,after reading the chapter 16 and the 
 itext's api for many
 times ,but still don't know how to remove the font 
 stream.forgive me,i'm
 always a stupid student.is there any example code?
 
 in your reply,you mentioned that  rewrite all the content 
 streams in the
 document from scratch.if there a way to copy original pdf but 
 just make that
 font not embedded,the problem may be resolved.how to do that?
 
 thanks.
 -- 
 View this message in context: 
 http://itext-general.2136553.n4.nabble.com/how-to-remove-embed
ded-font-stream-tp3160411p3161585.html
 Sent from the iText - General mailing list archive at Nabble.com.
 
 --
 
 Learn how Oracle Real Application Clusters (RAC) One Node 
 allows customers
 to consolidate database storage, standardize their database 
 environment, and, 
 should the need arise, upgrade to a full multi-node Oracle 
 RAC database 
 without downtime or disruption
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 Many questions posted to this list can (and will) be answered 
 with a reference to the iText book: http://www.itextpdf.com/book/
 Please check the keywords list before you ask for examples: 
 http://itextpdf.com/themes/keywords.php
 
 --
 
 Learn how Oracle Real Application Clusters (RAC) One Node 
 allows customers
 to consolidate database storage, standardize their database 
 environment, and, 
 should the need arise, upgrade to a full multi-node Oracle 
 RAC database 
 without downtime or disruption
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 Many questions posted to this list can (and will) be answered 
 with a reference to the iText book: http://www.itextpdf.com/book/
 Please check the keywords list before you ask for examples: 
 http://itextpdf.com/themes/keywords.php
 
 

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list

Re: [iText-questions] How can i set Master Password to No for a PDF

2010-12-23 Thread Mark Storer
how can i set Master
  Password to No ?
 You don't. Use a master password you know, and use that 
 password when you want to merge the PDF documents.

Agreed.  This need not be a fixed value either.  It could be something
you compute based on the file name for example... Or based on some data
in the PDF itself (XOR the document ID with some properly bizzare chunk
of bits... 0xDEADBEEF for example (only not that).  

You could open the file with the user password, get whatever data you
needed, compute the master/owner password, close it, and reopen it with
the owner password.

Alternatively, you could /not/ encrypt the separate files at all, and
only encrypt the merged files.  I suspect the individual PDFs will never
end up in front of a user on their own, right?  If so, protecting them
is pointless.  You only need to lock down the files that end up in front
of a user.

--Mark Storer
  Senior Software Engineer
  Cardiff.com

import com.cardiff.disclaimer;
DisclaimerCardiff DisCard = null;

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


[iText-questions] How to convert PPM image to bmp or jpeg images...???

2010-12-23 Thread sam_dev

Can any one help me regarding the conversion of ppm images to bmp or jpeg
imagesi am using c++...but i am not able to convert the image
properly...???
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/How-to-convert-PPM-image-to-bmp-or-jpeg-images-tp3162969p3162969.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


[iText-questions] Need help converting ByteArrayOutputStream to VB.NET equivalent

2010-12-23 Thread John R. Smith, Jr.
I am writing a VB.NET app utilizing iText and have hit a snag trying to
convert the following line from java to VB.NET.  I am creating a booklet so
I need to write the file to memory (need to know the total number of pages)
so I can rearrange the pages and then generate the real doc.  Can someone
tell me how to do this?  Also, is there anywhere you can direct me (book,
website, etc.) that would provide a good iText / VB.NET reference?

 

ByteArrayOutputStream baos = new ByteArrayOutputStream(); 

 

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Re: [iText-questions] How can i set Master Password to

2010-12-23 Thread nkumarkv

Thanks Mark,

In my case i need to give individual pdfs to users. They should only be able
to read the pdf. Copying the PDF content or modifying the content should be
disabled. But an admin should be able to merge pdfs of many users together
into a single pdf file. With setencryption i am able to disable copy and
content modificaiton, but merge asks for the master password. I agree that
we can use a valid master password and admin can use that for merging, but
is there any alternative ?
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/How-can-i-set-Master-Password-to-No-for-a-PDF-tp3161813p3162835.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] How can i set Master Password to

2010-12-23 Thread nkumarkv

Hi, 
Thanks for the reply. 
I am encrypting the PDf to disable copy and modify. I want to restrict the
users from copying the PDF contents or modifying the contensts. I think i
dont need to set any user or master password for this rite? 
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/How-can-i-set-Master-Password-to-No-for-a-PDF-tp3161813p3162830.html
Sent from the iText - General mailing list archive at Nabble.com.

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php


Re: [iText-questions] How can i set Master Password to

2010-12-23 Thread 1T3XT BVBA
Op 24/12/2010 2:50, nkumarkv schreef:
 Hi,
 Thanks for the reply.
 I am encrypting the PDf to disable copy and modify. I want to restrict the
 users from copying the PDF contents or modifying the contensts. I think i
 dont need to set any user or master password for this rite?
Suppose that it were possible to set a user password, but not an owner 
password.
In that case anyone would have all the permissions.
How do you suppose the PDF would be able to distinguish a user from an 
owner?
Elementary logic, my dear...

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php