You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Hiller, Gerhard" <Ge...@msh.de> on 2022/01/13 08:50:18 UTC
Wrong datatype for OPM in PDExtendedGraphicsState
Hi everybody,
we are using pdfbox to create PDFs for print production end encountered a problem using PDExtendedGraphicsState. PDFExtendesGraphicState offers the possibility to set the "overprint mode" (OPM):
/**
* This will get the overprint mode(OPM).
*
* @param overprintMode The overprint mode
*/
public void setOverprintMode( Float overprintMode )
{
setFloatItem(COSName.OPM, overprintMode);
}
This leads to an floating point number entry in the PDF-Document like this:
9 0 obj
<<
/Type /ExtGState
/OPM 1.0
/OP true
/op true
>>
Endobj
According to the PDF specification (https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf), page 129, OPM is defined as:
Key: OPM
Type: integer
Description: (Optional; PDF 1.3) The overprint mode (see 8.6.7, "Overprint Control")
The document should look like this:
9 0 obj
<<
/Type /ExtGState
/OPM 1
/OP true
/op true
>>
Endobj
The current implementation leads to processing erros, for example in the Harlequin RIP with following error-message :
%%[ Error: undefinedresource; OffendingCommand: PDF opcode Do; File: %ip:xyz% ]%%
We can work arround the problem creating the PDExtendedGraphicsState with an own Dictionary and set the OPM directly:
COSDictionary dict = new COSDictionary();
PDExtendedGraphicsState graphicsState = new PDExtendedGraphicsState(dict);
dict.setInt(COSName.OPM, 1);
If you need more information please contact me.
Mit freundlichen Grüßen
Gerhard Hiller
mailto:gerhard.hiller@msh.de | Phone: +49 711 72007 4163 | Mobile: +49 172 718 48 46
Printproduktion neu gedacht
- -
MSH Medien System Haus GmbH & Co. KG, Stuttgart, HRA 9274 Stuttgart
P.h.G.: MSH Medien System Haus Verwaltungsges. MbH, Stuttgart, HRB 4443 Stuttgart
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Wrong datatype for OPM in PDExtendedGraphicsState
Posted by Tilman Hausherr <TH...@t-online.de>.
Yeah this is a bug. I'll fix it soon unless somebody else does it.
Tilman
Am 13.01.2022 um 09:50 schrieb Hiller, Gerhard:
> Hi everybody,
>
> we are using pdfbox to create PDFs for print production end encountered a problem using PDExtendedGraphicsState. PDFExtendesGraphicState offers the possibility to set the "overprint mode" (OPM):
>
> /**
> * This will get the overprint mode(OPM).
> *
> * @param overprintMode The overprint mode
> */
> public void setOverprintMode( Float overprintMode )
> {
> setFloatItem(COSName.OPM, overprintMode);
> }
>
> This leads to an floating point number entry in the PDF-Document like this:
>
> 9 0 obj
> <<
> /Type /ExtGState
> /OPM 1.0
> /OP true
> /op true
> Endobj
>
> According to the PDF specification (https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf), page 129, OPM is defined as:
>
> Key: OPM
> Type: integer
> Description: (Optional; PDF 1.3) The overprint mode (see 8.6.7, "Overprint Control")
>
> The document should look like this:
>
> 9 0 obj
> <<
> /Type /ExtGState
> /OPM 1
> /OP true
> /op true
> Endobj
>
> The current implementation leads to processing erros, for example in the Harlequin RIP with following error-message :
>
> %%[ Error: undefinedresource; OffendingCommand: PDF opcode Do; File: %ip:xyz% ]%%
>
> We can work arround the problem creating the PDExtendedGraphicsState with an own Dictionary and set the OPM directly:
>
> COSDictionary dict = new COSDictionary();
> PDExtendedGraphicsState graphicsState = new PDExtendedGraphicsState(dict);
> dict.setInt(COSName.OPM, 1);
>
>
> If you need more information please contact me.
>
> Mit freundlichen Grüßen
> Gerhard Hiller
> mailto:gerhard.hiller@msh.de | Phone: +49 711 72007 4163 | Mobile: +49 172 718 48 46
>
> Printproduktion neu gedacht
> - -
>
> MSH Medien System Haus GmbH & Co. KG, Stuttgart, HRA 9274 Stuttgart
> P.h.G.: MSH Medien System Haus Verwaltungsges. MbH, Stuttgart, HRB 4443 Stuttgart
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Wrong datatype for OPM in PDExtendedGraphicsState
Posted by Tilman Hausherr <TH...@t-online.de>.
Fixed in
https://issues.apache.org/jira/browse/PDFBOX-5361
Thanks for reporting this!
Tilman
Am 13.01.2022 um 09:50 schrieb Hiller, Gerhard:
> Hi everybody,
>
> we are using pdfbox to create PDFs for print production end encountered a problem using PDExtendedGraphicsState. PDFExtendesGraphicState offers the possibility to set the "overprint mode" (OPM):
>
> /**
> * This will get the overprint mode(OPM).
> *
> * @param overprintMode The overprint mode
> */
> public void setOverprintMode( Float overprintMode )
> {
> setFloatItem(COSName.OPM, overprintMode);
> }
>
> This leads to an floating point number entry in the PDF-Document like this:
>
> 9 0 obj
> <<
> /Type /ExtGState
> /OPM 1.0
> /OP true
> /op true
> Endobj
>
> According to the PDF specification (https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf), page 129, OPM is defined as:
>
> Key: OPM
> Type: integer
> Description: (Optional; PDF 1.3) The overprint mode (see 8.6.7, "Overprint Control")
>
> The document should look like this:
>
> 9 0 obj
> <<
> /Type /ExtGState
> /OPM 1
> /OP true
> /op true
> Endobj
>
> The current implementation leads to processing erros, for example in the Harlequin RIP with following error-message :
>
> %%[ Error: undefinedresource; OffendingCommand: PDF opcode Do; File: %ip:xyz% ]%%
>
> We can work arround the problem creating the PDExtendedGraphicsState with an own Dictionary and set the OPM directly:
>
> COSDictionary dict = new COSDictionary();
> PDExtendedGraphicsState graphicsState = new PDExtendedGraphicsState(dict);
> dict.setInt(COSName.OPM, 1);
>
>
> If you need more information please contact me.
>
> Mit freundlichen Grüßen
> Gerhard Hiller
> mailto:gerhard.hiller@msh.de | Phone: +49 711 72007 4163 | Mobile: +49 172 718 48 46
>
> Printproduktion neu gedacht
> - -
>
> MSH Medien System Haus GmbH & Co. KG, Stuttgart, HRA 9274 Stuttgart
> P.h.G.: MSH Medien System Haus Verwaltungsges. MbH, Stuttgart, HRB 4443 Stuttgart
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org