Re: CMS: link targets are overlapped by header

2013-10-21 Thread Maruan Sahyoun
Yes - will so it later today

Maruan Sahyoun

 Am 21.10.2013 um 08:08 schrieb Andreas Lehmkuehler andr...@lehmi.de:
 
 Hi,
 
 Am 20.10.2013 17:38, schrieb Maruan Sahyoun:
 I fixed it in revision 15533919 - could you check if it works for you?
 It works fine for the faq page but not for the command line tools page which
 uses h3 for the affected headers. Would it make sense to add that negative
 offset to all kind of id-tag?
 
 
 BR
 Maruan
 
 Am 09.10.2013 um 11:56 schrieb Andreas Lehmkühler andr...@lehmi.de:
 
 Hi,
 
  Maruan Sahyoun sahy...@fileaffairs.de hat am 9. Oktober 2013 um 00:30 
 geschrieben:
 
 
  Hi Andreas,
 
  I can take care of it on Thursday.
 Cool, I guess some CSS-magic is needed. The FAQ-page has the same issue
 
  Maruan Sahyoun
 
   Am 08.10.2013 um 20:38 schrieb Andreas Lehmkuehler andr...@lehmi.de:
  
   Hi,
  
   I've tried to update the examples website and ran into an issue with 
 links or
   better link targets. The linking itself works fine, but if I jump to 
 one of the
   targets, my browser (same behaviour using firefox and chrome) scrolls 
 to that
   mark and the header overlaps it, so that it's totally hidden.
  
   Is there something we can do to adjust the scolling?
  
   BR
   Andreas Lehmkühler
 
 BR
 Andreas Lehmkühler
 
 BR
 Andreas Lehmkühler


Bug 1213

2013-10-21 Thread Axel Dörfler
Hi there,

some time ago, I've added a patch to bug 1213 that solves the issue by
letting PDFTextStripper.normalize() keep the TextPositions around.
Since that has been in January (at least this year), I wonder if I can do
anything to help push this patch into the next release.

Bye,
   Axel.


Change version 1.7.1 to 18.2:ConcurrentModificationException

2013-10-21 Thread Cleverson Pohlod
Does anyone know why when migrating from version 1.7.1 to version 1.8.2
error now occurs in the loop of images from pdf?
code:
 IteratorEntryString, Object it = images.entrySet().iterator();
 while (it.hasNext()) {
EntryString, Object entry = it.next();

error:

java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
at java.util.HashMap$EntryIterator.next(HashMap.java:847)
at java.util.HashMap$EntryIterator.next(HashMap.java:845)


Re: Change version 1.7.1 to 18.2:ConcurrentModificationException

2013-10-21 Thread Timo Boehme

Am 21.10.2013 15:40, schrieb Cleverson Pohlod:

Does anyone know why when migrating from version 1.7.1 to version 1.8.2
error now occurs in the loop of images from pdf?
code:
  IteratorEntryString, Object it = images.entrySet().iterator();
  while (it.hasNext()) {
 EntryString, Object entry = it.next();

error:

java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
at java.util.HashMap$EntryIterator.next(HashMap.java:847)
at java.util.HashMap$EntryIterator.next(HashMap.java:845)


This simply means that the images map from which you get the iterator is 
changed (images added/removed) while you are iterating over it. Thus the 
shown code is not the problem but some other statement not shown.



Best,
Timo


--

 Timo Boehme
 OntoChem GmbH
 H.-Damerow-Str. 4
 06120 Halle/Saale
 T: +49 345 4780474
 F: +49 345 4780471
 timo.boe...@ontochem.com

_

 OntoChem GmbH
 Geschäftsführer: Dr. Lutz Weber
 Sitz: Halle / Saale
 Registergericht: Stendal
 Registernummer: HRB 215461
_



[jira] [Created] (PDFBOX-1751) SignDict/Contents illegal data

2013-10-21 Thread David KELLER (JIRA)
David KELLER created PDFBOX-1751:


 Summary: SignDict/Contents illegal data
 Key: PDFBOX-1751
 URL: https://issues.apache.org/jira/browse/PDFBOX-1751
 Project: PDFBox
  Issue Type: Bug
  Components: Signing
Affects Versions: 1.8.0
 Environment: Windows 8.1
Reporter: David KELLER


1/ I sign a file using this method

public static void signByPdfbox(
File inputPDF,
File outputPDF,
KeyStore ks,
String password) 
throws IOException, UnrecoverableKeyException, KeyStoreException, 
NoSuchAlgorithmException, COSVisitorException, SignatureException {

PDDocument inputDoc = PDDocument.load(inputPDF);


PADESSigner signer = new PADESSigner(ks, password);

signer.setSignatureName(Hello1);
signer.setSignatureReason(Why noy);
signer.setSignatureLocation(Curacao);
signer.setSignatureContactInfo(david.keller...@gmail.com);

signer.signPDF(inputDoc, outputPDF);
}



2/ I resign the same file using the same method and in acrobat reader I have 
this error : SignDict/Contents illegal data

I have googelized it, and I found only old topics for iText lib.
I have tried the same with iText 5.X, and double signatures works






--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (PDFBOX-1751) SignDict/Contents illegal data

2013-10-21 Thread David KELLER (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David KELLER updated PDFBOX-1751:
-

Attachment: PADESSigner.java

Signature PADES using PdfBox lib

 SignDict/Contents illegal data
 --

 Key: PDFBOX-1751
 URL: https://issues.apache.org/jira/browse/PDFBOX-1751
 Project: PDFBox
  Issue Type: Bug
  Components: Signing
Affects Versions: 1.8.0
 Environment: Windows 8.1
Reporter: David KELLER
  Labels: security, signature
 Attachments: PADESSigner.java


 1/ I sign a file using this method
   public static void signByPdfbox(
   File inputPDF,
   File outputPDF,
   KeyStore ks,
   String password) 
   throws IOException, UnrecoverableKeyException, KeyStoreException, 
 NoSuchAlgorithmException, COSVisitorException, SignatureException {
   PDDocument inputDoc = PDDocument.load(inputPDF);
   
   
   PADESSigner signer = new PADESSigner(ks, password);
   
   signer.setSignatureName(Hello1);
   signer.setSignatureReason(Why noy);
   signer.setSignatureLocation(Curacao);
   signer.setSignatureContactInfo(david.keller...@gmail.com);
   
   signer.signPDF(inputDoc, outputPDF);
   }
 2/ I resign the same file using the same method and in acrobat reader I have 
 this error : SignDict/Contents illegal data
 I have googelized it, and I found only old topics for iText lib.
 I have tried the same with iText 5.X, and double signatures works



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (PDFBOX-1751) SignDict/Contents illegal data

2013-10-21 Thread David KELLER (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13800875#comment-13800875
 ] 

David KELLER commented on PDFBOX-1751:
--

on google you have only fives topics  
https://www.google.fr/search?q=SignDict/Contents+illegal+data

you can find some hints here:
http://itext-general.2136553.n4.nabble.com/iText-error-in-signing-big-PDF-files-SigDict-Contents-illegal-data-td4655309.html#none

---
this indeed is a bug in iText.

Everything in the signing process is done correctly, merely the serialization 
of the signed byte range into the resulting PDF is somewhat inaccurate.

PdfSignatureAppearance.preClose(HashMap) creates the byte sequence representing 
the signed ranges like this:

ByteBuffer bf = new ByteBuffer();
bf.append('[');
for (int k = 0; k  range.length; ++k)
bf.append(range[k]).append(' ');
bf.append(']');

ByteBuffer is com.itextpdf.text.pdf.ByteBuffer, range is a long[] member of 
PdfSignatureAppearance.

Unfortunately there is no ByteBuffer method append(long); thus, the overload 
append(float) is called here by Java instead (and not append(double) as one 
might have hoped for). As the conversion long - float is lossy, the numbers in 
the /ByteRange array are merely approximations... ;)

Adding a decent ByteBuffer.append overload for long arguments should fix this 
issue.

Regards,   Michael

PS: Reposted as the original post seems to have gone awol on its way to the 
mailing list. 


 SignDict/Contents illegal data
 --

 Key: PDFBOX-1751
 URL: https://issues.apache.org/jira/browse/PDFBOX-1751
 Project: PDFBox
  Issue Type: Bug
  Components: Signing
Affects Versions: 1.8.0
 Environment: Windows 8.1
Reporter: David KELLER
  Labels: security, signature
 Attachments: PADESSigner.java


 1/ I sign a file using this method
   public static void signByPdfbox(
   File inputPDF,
   File outputPDF,
   KeyStore ks,
   String password) 
   throws IOException, UnrecoverableKeyException, KeyStoreException, 
 NoSuchAlgorithmException, COSVisitorException, SignatureException {
   PDDocument inputDoc = PDDocument.load(inputPDF);
   
   
   PADESSigner signer = new PADESSigner(ks, password);
   
   signer.setSignatureName(Hello1);
   signer.setSignatureReason(Why noy);
   signer.setSignatureLocation(Curacao);
   signer.setSignatureContactInfo(david.keller...@gmail.com);
   
   signer.signPDF(inputDoc, outputPDF);
   }
 2/ I resign the same file using the same method and in acrobat reader I have 
 this error : SignDict/Contents illegal data
 I have googelized it, and I found only old topics for iText lib.
 I have tried the same with iText 5.X, and double signatures works



--
This message was sent by Atlassian JIRA
(v6.1#6144)


Re: CMS: link targets are overlapped by header

2013-10-21 Thread Maruan Sahyoun
Hi Andreas,

I added additional headers in revision 1534330. 

BR
Maruan Sahyoun

FileAffairs GmbH
Josef-Schappe-Straße 21
40882 Ratingen

Tel: +49 (2102) 89497 88
Fax: +49 (2102) 89497 91
sahy...@fileaffairs.de
www.fileaffairs.de

Geschäftsführer: Maruan Sahyoun
Handelsregister: AG Düsseldorf, HRB 53837
UST.-ID: DE248275827

Am 21.10.2013 um 08:08 schrieb Andreas Lehmkuehler andr...@lehmi.de:

 Hi,
 
 Am 20.10.2013 17:38, schrieb Maruan Sahyoun:
 I fixed it in revision 15533919 - could you check if it works for you?
 It works fine for the faq page but not for the command line tools page which
 uses h3 for the affected headers. Would it make sense to add that negative
 offset to all kind of id-tag?
 
 
 BR
 Maruan
 
 Am 09.10.2013 um 11:56 schrieb Andreas Lehmkühler andr...@lehmi.de:
 
 Hi,
 
  Maruan Sahyoun sahy...@fileaffairs.de hat am 9. Oktober 2013 um 00:30 
 geschrieben:
 
 
  Hi Andreas,
 
  I can take care of it on Thursday.
 Cool, I guess some CSS-magic is needed. The FAQ-page has the same issue
 
  Maruan Sahyoun
 
   Am 08.10.2013 um 20:38 schrieb Andreas Lehmkuehler andr...@lehmi.de:
  
   Hi,
  
   I've tried to update the examples website and ran into an issue with 
 links or
   better link targets. The linking itself works fine, but if I jump to 
 one of the
   targets, my browser (same behaviour using firefox and chrome) scrolls 
 to that
   mark and the header overlaps it, so that it's totally hidden.
  
   Is there something we can do to adjust the scolling?
  
   BR
   Andreas Lehmkühler
 
 BR
 Andreas Lehmkühler
 
 BR
 Andreas Lehmkühler



[jira] [Closed] (PDFBOX-1751) SignDict/Contents illegal data

2013-10-21 Thread Thomas Chojecki (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Chojecki closed PDFBOX-1751.
---

Resolution: Not A Problem
  Assignee: Thomas Chojecki

The method  signPDF(PDDocument inputDoc ...) malform the document. 
inputDoc.save() will rewrite the signed document and broke the signature. 

You need to use the method signPDF(byte[] ) to do it the right way.
Maybe something like this

  public static void main(String[] args) throws Exception
  {
String pin = 123456;
File out = new File(tmp/Sample_signed.pdf);
File out2 = new File(tmp/Sample_signed_signed.pdf);

KeyStore keystore = null;
try (InputStream documentIS = 
PADESSigner.class.getResourceAsStream(/pdfbox_1751/Sample.pdf);
InputStream keystoreIS = 
PADESSigner.class.getResourceAsStream(/pdfbox_1751/Author01.p12);) {
  keystore = KeyStore.getInstance(pkcs12);
  keystore.load(keystoreIS, pin.toCharArray());

  PADESSigner padesSigner = new PADESSigner(keystore, pin);
  padesSigner.setSignatureName(Testing);
  padesSigner.signPDF(IOUtils.toByteArray(documentIS), out);
}

try (InputStream documentIS = new FileInputStream(out);) {
  PADESSigner padesSigner = new PADESSigner(keystore, pin);
  padesSigner.setSignatureName(Testing);
  padesSigner.signPDF(IOUtils.toByteArray(documentIS), out2);
}

  }

 SignDict/Contents illegal data
 --

 Key: PDFBOX-1751
 URL: https://issues.apache.org/jira/browse/PDFBOX-1751
 Project: PDFBox
  Issue Type: Bug
  Components: Signing
Affects Versions: 1.8.0
 Environment: Windows 8.1
Reporter: David KELLER
Assignee: Thomas Chojecki
  Labels: security, signature
 Attachments: PADESSigner.java


 1/ I sign a file using this method
   public static void signByPdfbox(
   File inputPDF,
   File outputPDF,
   KeyStore ks,
   String password) 
   throws IOException, UnrecoverableKeyException, KeyStoreException, 
 NoSuchAlgorithmException, COSVisitorException, SignatureException {
   PDDocument inputDoc = PDDocument.load(inputPDF);
   
   
   PADESSigner signer = new PADESSigner(ks, password);
   
   signer.setSignatureName(Hello1);
   signer.setSignatureReason(Why noy);
   signer.setSignatureLocation(Curacao);
   signer.setSignatureContactInfo(david.keller...@gmail.com);
   
   signer.signPDF(inputDoc, outputPDF);
   }
 2/ I resign the same file using the same method and in acrobat reader I have 
 this error : SignDict/Contents illegal data
 I have googelized it, and I found only old topics for iText lib.
 I have tried the same with iText 5.X, and double signatures works



--
This message was sent by Atlassian JIRA
(v6.1#6144)


Re: CMS: link targets are overlapped by header

2013-10-21 Thread Andreas Lehmkuehler

Hi,

Am 21.10.2013 21:22, schrieb Maruan Sahyoun:

Hi Andreas,

I added additional headers in revision 1534330.

Works fine, I guess we shouldn't wait to publish those changes.

Thanks for looking into it!

BR
Andreas Lehmkühler


BR
Maruan Sahyoun

FileAffairs GmbH
Josef-Schappe-Straße 21
40882 Ratingen

Tel: +49 (2102) 89497 88
Fax: +49 (2102) 89497 91
sahy...@fileaffairs.de
www.fileaffairs.de

Geschäftsführer: Maruan Sahyoun
Handelsregister: AG Düsseldorf, HRB 53837
UST.-ID: DE248275827

Am 21.10.2013 um 08:08 schrieb Andreas Lehmkuehler andr...@lehmi.de:


Hi,

Am 20.10.2013 17:38, schrieb Maruan Sahyoun:

I fixed it in revision 15533919 - could you check if it works for you?

It works fine for the faq page but not for the command line tools page which
uses h3 for the affected headers. Would it make sense to add that negative
offset to all kind of id-tag?



BR
Maruan

Am 09.10.2013 um 11:56 schrieb Andreas Lehmkühler andr...@lehmi.de:


Hi,


  Maruan Sahyoun sahy...@fileaffairs.de hat am 9. Oktober 2013 um 00:30 
geschrieben:


  Hi Andreas,

  I can take care of it on Thursday.

Cool, I guess some CSS-magic is needed. The FAQ-page has the same issue


  Maruan Sahyoun

   Am 08.10.2013 um 20:38 schrieb Andreas Lehmkuehler andr...@lehmi.de:
  
   Hi,
  
   I've tried to update the examples website and ran into an issue with links 
or
   better link targets. The linking itself works fine, but if I jump to one of 
the
   targets, my browser (same behaviour using firefox and chrome) scrolls to 
that
   mark and the header overlaps it, so that it's totally hidden.
  
   Is there something we can do to adjust the scolling?
  
   BR
   Andreas Lehmkühler


BR
Andreas Lehmkühler


BR
Andreas Lehmkühler







[jira] [Created] (PDFBOX-1752) Rendering PDF containing Jpeg2000 fails

2013-10-21 Thread David KELLER (JIRA)
David KELLER created PDFBOX-1752:


 Summary: Rendering PDF containing Jpeg2000 fails
 Key: PDFBOX-1752
 URL: https://issues.apache.org/jira/browse/PDFBOX-1752
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 1.8.2
 Environment: Windows 8.1
Reporter: David KELLER


Rendering PDF containing Jpeg2000 fails with PdfBox



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (PDFBOX-1752) Rendering PDF containing Jpeg2000 fails

2013-10-21 Thread David KELLER (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David KELLER updated PDFBOX-1752:
-

Attachment: Document_20130625-190105_0001.pdf.pdfbox.png
Document_20130625-190105_0001.pdf.jpedal.png
Document_20130625-190105_0001.pdf.icepdf.png
Document_20130625-190105_0001.pdf.ghost4j.png
Document_20130625-190105_0001.pdf

only jpedal on ghostscript can render this PDF

 Rendering PDF containing Jpeg2000 fails
 ---

 Key: PDFBOX-1752
 URL: https://issues.apache.org/jira/browse/PDFBOX-1752
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 1.8.2
 Environment: Windows 8.1
Reporter: David KELLER
  Labels: image, imageio, render
 Attachments: Document_20130625-190105_0001.pdf, 
 Document_20130625-190105_0001.pdf.ghost4j.png, 
 Document_20130625-190105_0001.pdf.icepdf.png, 
 Document_20130625-190105_0001.pdf.jpedal.png, 
 Document_20130625-190105_0001.pdf.pdfbox.png


 Rendering PDF containing Jpeg2000 fails with PdfBox



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (PDFBOX-1752) Rendering PDF containing Jpeg2000 fails

2013-10-21 Thread David KELLER (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13801107#comment-13801107
 ] 

David KELLER commented on PDFBOX-1752:
--

Scans come from Canon-Iris and Nuance-Omnipage technologies using  Jpeg2000 
with MRC (Mixed Raster Content )

 Rendering PDF containing Jpeg2000 fails
 ---

 Key: PDFBOX-1752
 URL: https://issues.apache.org/jira/browse/PDFBOX-1752
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 1.8.2
 Environment: Windows 8.1
Reporter: David KELLER
  Labels: image, imageio, render
 Attachments: Document_20130625-190105_0001.pdf, 
 Document_20130625-190105_0001.pdf.ghost4j.png, 
 Document_20130625-190105_0001.pdf.icepdf.png, 
 Document_20130625-190105_0001.pdf.jpedal.png, 
 Document_20130625-190105_0001.pdf.pdfbox.png


 Rendering PDF containing Jpeg2000 fails with PdfBox



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Comment Edited] (PDFBOX-1752) Rendering PDF containing Jpeg2000 fails

2013-10-21 Thread David KELLER (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13801104#comment-13801104
 ] 

David KELLER edited comment on PDFBOX-1752 at 10/21/13 9:29 PM:


only jpedal and ghostscript libs can render this PDF


was (Author: david.keller):
only jpedal on ghostscript can render this PDF

 Rendering PDF containing Jpeg2000 fails
 ---

 Key: PDFBOX-1752
 URL: https://issues.apache.org/jira/browse/PDFBOX-1752
 Project: PDFBox
  Issue Type: Bug
Affects Versions: 1.8.2
 Environment: Windows 8.1
Reporter: David KELLER
  Labels: image, imageio, render
 Attachments: Document_20130625-190105_0001.pdf, 
 Document_20130625-190105_0001.pdf.ghost4j.png, 
 Document_20130625-190105_0001.pdf.icepdf.png, 
 Document_20130625-190105_0001.pdf.jpedal.png, 
 Document_20130625-190105_0001.pdf.pdfbox.png


 Rendering PDF containing Jpeg2000 fails with PdfBox



--
This message was sent by Atlassian JIRA
(v6.1#6144)