Re: [iText-questions] how to construct a geospatial measure dictionary?
Mark Storer-3wrote: Reading the ISO supplement, it looks like the measure dictionary has to be attached to a particular XObject (form or image) to do any good. Adding it to the document without being referenced elsewhere isn't going to help much. Yes, that's why I construct a vieport dictionary (/VP pdf reference 1.7, p.148) to the page object. It contains all entries which which are given on page 745 in pdf reference 1.7. The /Measure key is manual referenced to my measure dictionary on the document. Do you think this could work? Thanks for your interest! -- View this message in context: http://www.nabble.com/how-to-construct-a-geospatial-measure-dictionary--tp20703775p20715618.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] electronic signature
Can any one help on electronic signature ? - 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] Signatures with SHA256
Hi,Has this been implemented since iText 2.1.4 (See thread below)? I would love to have this functionality. I have implemented an external signature, so I can sign the thing just fine, but the PdfPKCS7 instance always returns SHA1 from the getHasingAlgorithm method despite me passing in SHA256 [PdfPKCS7 sig = sg.getSigner(); ] . The PDF gets signed, but the signature does not verify in Acrobat Reader due to it thinking its a SHA1 digest. Is there a way I can update this SHA1 property to SHA256 and have the thing work, or is the only way a code update to PdfPKCS7 as posted previously by Robert?Many thanks for your time.- Simon Re: [iText-questions] Signatures with SHA256 Paulo Soares Thu, 01 Mar 2007 08:48:36 -0800 You can use an external signature. Now that the bouncycastle libraries are required I'm modifying PdfPKCS7.java to use the existing crypto libraries to do all the work including decoding all the algorithm types. When it's ready it will be easier to use other algorithms. Paulo -Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Robert Esterer Sent: Thursday, March 01, 2007 1:36 PM To: 'Post all your questions about iText here' Subject: [iText-questions] Signatures with SHA256 Hello, Because of the upcoming requirements for Qualified Signatures in Germany it might (or probably will) be necessary to replace SHA1 with SHA256 by the end of this year [1]. I looked at the current PDF Reference (1.7) and accoring to it, SHA256 support already came with PDF 1.6. The way I understand that table (p. 740 in the Reference) using SHA256 (or any algorithm other than SHA1) for hashing the document itself is only possible if the subfilter is either adbe.x509.rsa.sha1 or adbe.pkcs7.detached. The former does not includes CRLs and generally does not require revocation checks, so it's not really an option. adbe.pkcs7.detached seems to be what I am looking for, but I can't really figure out how to use it in iText. During my experiments I noticed that iText does not have the OIDs for all the new algorithms (PdfPKCS7.java). I added the SHA256 OID and the corresponding case in the constructor. I crated a patch and attached it to the mail. (I'll be glad to add all the others as well) The only remaining questions for me are: How do I use a custom filter/subfilter combo with a custom hash algorithm without editing iText? There is no set method for hashAlgorithm and I didn't see any obvious candidates for it. My idea would be tho just create my own little class that extends PdfSigGenericPKCS. Also, there is no signing example for VeriSign (= ADBE_PKCS7_DETACHED) and external signature digest generation, but am I right in the assumption that it would work identical to the WINCER_SIGNED example? Thanks in advance, Robert [1] http://www.bsi.de/esig/kryptoalg.htm Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. - 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 cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ iText-questions mailing [EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/ - 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] how to construct a geospatial measure dictionary?
Matthias Uhler wrote: Hello, could you please give me some support to create a working geospatial measure dictionary as it is described in the ISO 32000 Supplement... I solved my problem with a WKT String... here is the sourcecode and my sample file: http://www.nabble.com/file/p20720859/test.pdf test.pdf PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(test.pdf)); writer.setPdfVersion(PdfWriter.VERSION_1_7); document.open(); PdfDictionary dicMeasure = new PdfDictionary(new PdfName(Measure)); dicMeasure.put(PdfName.SUBTYPE,new PdfName(GEO)); PdfArray bounds = new PdfArray(); bounds.add(new float[]{0.0f,0.0f,0.0f,1.0f,1.0f,1.0f,1.0f,0.0f}); PdfArray pdu = new PdfArray(); pdu.add(new PdfName(KM)); pdu.add(new PdfName(SQKM)); pdu.add(new PdfName(GRD)); PdfArray lpts = new PdfArray(); //ll x,y; ur x,y lpts.add(new float[]{0.0f,1.0f,1.0f,0.0f}); PdfArray gpts = new PdfArray(); //ll latitude, longitude; ur latitude longitude gpts.add(new float[]{20.0f,20.0f,40.0f,40.0f}); dicMeasure.put(new PdfName(Bounds),bounds); dicMeasure.put(new PdfName(PDU),pdu); dicMeasure.put(new PdfName(LPTS),lpts); dicMeasure.put(new PdfName(GPTS),gpts); PdfDictionary dicGCS = new PdfDictionary(new PdfName(GEOGCS)); dicGCS.put(new PdfName(WKT),new PdfString(GEOGCS[\GCS_North_American_1983\,DATUM[\D_North_American_1983\,SPHEROID[\GRS_1980\,6378137.0,298.257222101]],PRIMEM[\Greenwich\,0.0],UNIT[\Degree\,0.0174532925199433]])); PdfIndirectObject indObjGCS = writer.addToBody(dicGCS); PdfIndirectReference indRefGCS = indObjGCS.getIndirectReference(); dicMeasure.put(new PdfName(GCS),indRefGCS); dicMeasure.put(new PdfName(DCS),indRefGCS); writer.addToBody(dicMeasure); PdfContentByte cb = writer.getDirectContent(); cb.setColorFill(Color.gray); cb.rectangle(20,20,document.getPageSize().getWidth()-40,document.getPageSize().getHeight()-40); cb.fill(); document.close(); This file also works in the Adobe Reader 9 but the measurment tool isn't available. Do you have any idea how to enable the measurment tool? -- View this message in context: http://www.nabble.com/how-to-construct-a-geospatial-measure-dictionary--tp20703775p20720859.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