[iText-questions] Regarding IText Support for XSL-FO

2008-12-01 Thread Nihar Bhatt
Hi ,

I want to know that does IText Support XSL-FO to PDF/TEXT/PRINT conversion
like FOP does ?

Thanking You,

Nihar Bhatt (INDIA)
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

[iText-questions] pdf signature problem on adobe reader 9

2008-12-01 Thread mustafahalil yildiz


Hi,
I sign a pdf using the code below and then when I want to open it in adobe 
reader 8 or previous versions it works fine and I can see the signature but 
when I open it with adobe reader 9.0 I couldnt see the signature what can be 
the problem ? can anyone help me?

byte[] pdfBits = baos.toByteArray();
SunPKCS11 akisProvider = new 
SunPKCS11(Configuration.getHSMSettings());
Security.addProvider(akisProvider);
KeyStore ks = KeyStore.getInstance(PKCS11, akisProvider);
ks.load(null, hsmPassword);
String alias = ks.aliases().nextElement();
key = (PrivateKey) ks.getKey(alias, hsmPassword);
chain = new java.security.cert.Certificate[1];
chain[0] = ks.getCertificate(alias);

reader = new PdfReader(new ByteArrayInputStream(pdfBits));

ByteArrayOutputStream fout = new ByteArrayOutputStream();

PdfStamper stp = PdfStamper.createSignature(reader, fout, '\0'); 
  
PdfSignatureAppearance sap = stp.getSignatureAppearance();


sap.setCertificationLevel(PdfSignatureAppearance.CERTIFIED_NO_CHANGES_ALLOWED);


sap.setRender(PdfSignatureAppearance.SignatureRenderNameAndDescription);
sap.setCrypto(key, chain, 
null,PdfSignatureAppearance.WINCER_SIGNED);
sap.setReason(Bu belgenin içeriği doğrudur ve tamdır.);
sap.setLocation(Ankara, TR);

Rectangle size = reader.getPageSize(1);
size.setLeft(size.getRight() - 220);
size.setRight(size.getRight() - 20);
size.setBottom(size.getTop() - 70);
size.setTop(size.getTop() - 20);
sap.setVisibleSignature(size, 1, null);
stp.close(); 

try {
FileOutputStream fos; 
fos = new FileOutputStream(new File(C:/imzali_dfg.pdf)); 
fos.write(fout.toByteArray() );
fos.flush();
fos.close();
} catch ( Exception e) { 
e.printStackTrace();
}  

  Halil

_
Access your email online and on the go with Windows Live Hotmail.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_access_112008-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

[iText-questions] epsg entry in gcs dictionary?

2008-12-01 Thread Matthias Uhler

hi,

when i choose a wkt string for WGS84 as entry in a geographic coordinat
system dictionary (iso 32000 supplement, p. 51) like this:
dictionaryGCS.put(new PdfName(WKT),new PdfString(GEOGCS[...]));
The georeferencing works great!

Instead of using an wkt string I tried to change the entry to an EPSG-code:
dictionaryGCS.put(new PdfName(EPSG),new PdfNumber(4326)); //EPSG of
wgs84
This doesn't work! I tried also other epsg codes without any success.

Do you have any idea or hints how to put the code for a working PDF?

Thank you, Matthias
-- 
View this message in context: 
http://www.nabble.com/epsg-entry-in-gcs-dictionary--tp20774491p20774491.html
Sent from the iText - General mailing list archive at Nabble.com.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


Re: [iText-questions] pdf signature problem on adobe reader 9

2008-12-01 Thread Leonard Rosenthol

Please provide a sample PDF that demonstrates the problem.

Leonard

On Dec 1, 2008, at 2:16 PM, mustafahalil yildiz wrote:



Hi,
I sign a pdf using the code below and then when I want to open it in  
adobe reader 8 or previous versions it works fine and I can see the  
signature but when I open it with adobe reader 9.0 I couldnt see the  
signature what can be the problem ? can anyone help me?


byte[] pdfBits = baos.toByteArray();
SunPKCS11 akisProvider = new  
SunPKCS11(Configuration.getHSMSettings());

Security.addProvider(akisProvider);
KeyStore ks = KeyStore.getInstance(PKCS11,  
akisProvider);

ks.load(null, hsmPassword);
String alias = ks.aliases().nextElement();
key = (PrivateKey) ks.getKey(alias, hsmPassword);
chain = new java.security.cert.Certificate[1];
chain[0] = ks.getCertificate(alias);

reader = new PdfReader(new ByteArrayInputStream(pdfBits));

ByteArrayOutputStream fout = new ByteArrayOutputStream();

PdfStamper stp = PdfStamper.createSignature(reader,  
fout, '\0');


PdfSignatureAppearance sap = stp.getSignatureAppearance();

 
sap 
.setCertificationLevel 
(PdfSignatureAppearance.CERTIFIED_NO_CHANGES_ALLOWED);


 
sap 
.setRender(PdfSignatureAppearance.SignatureRenderNameAndDescription);
sap.setCrypto(key, chain,  
null,PdfSignatureAppearance.WINCER_SIGNED);
sap.setReason(Bu belgenin içeriği doğrudur ve  
tamdır.);

sap.setLocation(Ankara, TR);

Rectangle size = reader.getPageSize(1);
size.setLeft(size.getRight() - 220);
size.setRight(size.getRight() - 20);
size.setBottom(size.getTop() - 70);
size.setTop(size.getTop() - 20);
sap.setVisibleSignature(size, 1, null);
stp.close();

try {
FileOutputStream fos;
fos = new FileOutputStream(new File(C:/ 
imzali_dfg.pdf));

fos.write(fout.toByteArray() );
fos.flush();
fos.close();
} catch ( Exception e) {
e.printStackTrace();
}

  Halil

Access your email online and on the go with Windows Live Hotmail.  
Sign up today.  
-
This SF.Net email is sponsored by the Moblin Your Move Developer's  
challenge
Build the coolest Linux based applications with Moblin SDK  win  
great prizes
Grand prize is a trip for two to an Open Source event anywhere in  
the world

http://moblin-contest.org/redirect.php?banner_id=100url=/___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Re: [iText-questions] Re garding IText Support for XSL-FO

2008-12-01 Thread mister bean

iText is not a FOP engine. However, it is the library that is used in several
FOP engines, such as the one in RenderX.

---mr. bean


ntimesc wrote:
 
 Hi ,
 
 I want to know that does IText Support XSL-FO to PDF/TEXT/PRINT conversion
 like FOP does ?
 
 Thanking You,
 
 Nihar Bhatt (INDIA)
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 iText-questions mailing list
 iText-questions@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/itext-questions
 
 Buy the iText book: http://www.1t3xt.com/docs/book.php
 

-- 
View this message in context: 
http://www.nabble.com/Regarding-IText-Support-for-XSL-FO-tp20770765p20779029.html
Sent from the iText - General mailing list archive at Nabble.com.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


[iText-questions] Image size in ColumnText

2008-12-01 Thread native.human

I am using ColumnText.addElement to add an Image object that I have run
scalePercent on. It seems to be ignoring my scaling and making the image the
width of the entire column. Seems like it might have to do with text mode
vs. compsite mode, but I think I'm in composite mode. My code looks like
this, and previous to this code is a call to ct.go(), so there's nothing
else in the column but the image at this point:

   imgGraph.scalePercent(50);
   imgGraph.setAlignment(Image.LEFT);
   /*
* Add chart for simulated render
   */
   ct.addElement(imgGraph);
   /*
   * Start new page if necessary.
   */
   handleOrphans(ct, document, columnTop);

  /*
   * Add chart again, because handleOrphans only simulates 
   * render.
   */
   ct.addElement(imgGraph);
   /*
   * Actual render, handling paging as necessary
   */
   handlePaging(ct, document, columnTop, Highlight graph);
   

handleOrphans looks like this:
 protected void handleOrphans(ColumnText ct, Document document, 
float columnTop) throws DocumentException {
/*
 * Position to render at. Default to position before the render.
 */
float position = ct.getYLine();
/*
 * Pretend to render column
 */
int status = ct.go(true);
/*
 * If it doesn't all fit...
 */
if (ColumnText.hasMoreText(status)) {
/*
 * Clear column contents in case there's content still in there.
 */
ct.setText(null);
/*
 * Start new page
 */
document.newPage();
/*
 * Set position to top of page
 */
position = columnTop;
}

/*
 * Set position to top of page
 */
ct.setYLine(position);
}

and handlePaging looks like this:

protected void handlePaging(ColumnText ct, Document document, 
float columnTop, String description) throws DocumentException {
/*
 * Page count.
 */
int pageCount = 0;
/*
 * Max out at 100 pages to prevent an infinite loop.
 */
final int maxPage = 100;

/*
 * Render column
 */
int status = ct.go();
/*
 * If there's more text, start a new page and continue.
 */
while (ColumnText.hasMoreText(status)  pageCount  maxPage) {
/*
 * Start new page
 */
document.newPage();
/*
 * Move column position to top of page
 */
ct.setYLine(columnTop);
/*
 * Render again
 */
status = ct.go();
}
}
-- 
View this message in context: 
http://www.nabble.com/Image-size-in-ColumnText-tp20780624p20780624.html
Sent from the iText - General mailing list archive at Nabble.com.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php


[iText-questions] Re gading Locking PDF file when created from editing from PdfWriter.

2008-12-01 Thread abhisheksinha

Hi All ,

 I have a requirement that a pdf document that is generated using Itext ,
Cannot be edited by using PdfWriter. How can i lock the document from
further writing once document had been generated.

Please help.

-- 
View this message in context: 
http://www.nabble.com/Regading-Locking-PDF-file-when-created-from-editing-from-PdfWriter.-tp20786465p20786465.html
Sent from the iText - General mailing list archive at Nabble.com.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php