Must set the PDFAWriter ColorProfile before getting a new page
Alain Brion <[email protected]> Fri, 13 Nov 2015 15:13:49 +0100
| Newsgroups | gmane.comp.java.lib.itext.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============2361575841153289762==
Content-Type: multipart/alternative;
boundary="------------020403090107060707050509"
This is a multi-part message in MIME format.
--------------020403090107060707050509
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
I use iTextSharp to create PDF/A documents with links
I spent several hours to fix an issue in my code.
I got a null-reference exception when calling newPage() after putting a
link (PDFAction) in previous page.
I had to debug inside the source of the PDF/A part to figure out that
the ColorProfile is to be assigned into the PDFWriter *before *doing
anything (I was assigning it just before closing the document).
So I just want to suggest to add a check on this case
In PdfA1Checker.cs, after line 422 (version 5.5.7), throw an exception
if the colorProfile is null with a text complaining about the
ColorProfile being null in the PDFWriter. This would help developers to
fix this issue.
Regards,
Alain
--------------020403090107060707050509
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I use iTextSharp to create PDF/A documents with links<br>
<br>
I spent several hours to fix an issue in my code.<br>
<br>
I got a null-reference exception when calling newPage() after
putting a link (PDFAction) in previous page.<br>
<br>
I had to debug inside the source of the PDF/A part to figure out
that the ColorProfile is to be assigned into the PDFWriter <b>before
</b>doing anything (I was assigning it just before closing the
document).<br>
<br>
So I just want to suggest to add a check on this case<br>
<br>
In PdfA1Checker.cs, after line 422 (version 5.5.7), throw an
exception if the colorProfile is null with a text complaining about
the ColorProfile being null in the PDFWriter. This would help
developers to fix this issue.<br>
<br>
Regards,<br>
<br>
Alain<br>
</body>
</html>
--------------020403090107060707050509--
--===============2361575841153289762==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
--===============2361575841153289762==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
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
--===============2361575841153289762==--