[
https://issues.apache.org/jira/browse/PDFBOX-3420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15377220#comment-15377220
]
Tilman Hausherr edited comment on PDFBOX-3420 at 7/14/16 4:22 PM:
------------------------------------------------------------------
Thanks, your file is indeed broken. It has a CSS after the first %EOF:
{code}
<style type="text/css">
#exception_error {
background: #ddd;
font-size: 1em;
font-family:sans-serif;
text-align: left;
color: #333333;
}
#exception_error h1,
#exception_error h2 {
margin: 0;
padding: 1em;
font-size: 1em;
font-weight: normal;
background: #911911;
color: #FFFFFF;
}
#exception_error h1 a,
#exception_error h2 a {
color: #FFFFFF;
}
#exception_error h2 {
background: #666666;
}
#exception_error h3 {
margin: 0;
padding: 0.4em 0 0;
font-size: 1em;
font-weight: normal;
}
#exception_error p {
margin: 0;
padding: .4em;
}
#exception_error a {
color: #1b323b;
}
</style>
<div id="exception_error">
<h1><span class="type">An Error Was Encountered [ 500 ]</span></h1>
<div class="content">
<p><p>Unable to locate the file: error.php</p></p>
</div>
</div>
{code}
It works with the non sequential parser, but I found that there's also a place
within PDFBox (outside of the example) that needs to be changed. I'll do it.
was (Author: tilman):
Thanks, your file is indeed broken. It has a CSS after the first %EOF:
{code}
<style type="text/css">
#exception_error {
background: #ddd;
font-size: 1em;
font-family:sans-serif;
text-align: left;
color: #333333;
}
#exception_error h1,
#exception_error h2 {
margin: 0;
padding: 1em;
font-size: 1em;
font-weight: normal;
background: #911911;
color: #FFFFFF;
}
#exception_error h1 a,
#exception_error h2 a {
color: #FFFFFF;
}
#exception_error h2 {
background: #666666;
}
#exception_error h3 {
margin: 0;
padding: 0.4em 0 0;
font-size: 1em;
font-weight: normal;
}
#exception_error p {
margin: 0;
padding: .4em;
}
#exception_error a {
color: #1b323b;
}
</style>
<div id="exception_error">
<h1><span class="type">An Error Was Encountered [ 500 ]</span></h1>
<div class="content">
<p><p>Unable to locate the file: error.php</p></p>
</div>
</div>
{code}
It works with the non sequential parser, but I found that there's also a place
within PDFBox (outside of the example) that needs to be changed.
> Can't sign pdf with a particular attachment
> -------------------------------------------
>
> Key: PDFBOX-3420
> URL: https://issues.apache.org/jira/browse/PDFBOX-3420
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 1.8.12
> Reporter: Daniel Zsigus
> Attachments: 12_Cegkivonat_BOXPRINT.pdf,
> helloworld-attached-2.0.2.pdf, helloworld-attached-fail-1.8.12.pdf
>
>
> We have a few problematic PDF files which the Adobe Reader opens without any
> error but when we attach them with PDFBox 1.8.12 to any other PDF and try to
> sign the file with the attachment, it throws an exception and the signing
> fails.
> The thrown exception is:
> org.apache.pdfbox.exceptions.SignatureException: The PDF file has no pages
> If we use PDFBox 2.0.2 to attach, the signing succeeds.
> Unfortunately we cannot publish the PDFs, they have confidential informations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]