I am having lots of trouble getting these posts to go through . . .
they keep getting rejected by sourceforge . . .
so this may be redundant. If you get it!
Could you share your 2 bpp workaround? . . . Will it work for raw image
data if I specify something like the following:
// 2-bit logic (0 black 3 white/transparent)
int transparency[] = {3, 3};
pdfImage =
com.lowagie.text.Image.getInstance(xSize,ySize,1,2,data,transparency);
Of course this presumes I transform the bilevel image data to 2-bit . .
. which would be better than 8 bit!
Thanks,
Jerold Sampson
Paulo Soares wrote:
> Bilevel images with color key masking don't work in Acrobat. I have a
> workaround in gif images to use 2 bpp instead of 1 bpp if transparency is
> present. Either you raise the bpp or you include a full image mask. You can
> create a black image 1x1 pixel and use your real image as image mask.
>
> Paulo
>
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On
>> Behalf Of Jerold Sampson
>> Sent: Thursday, November 09, 2006 4:45 PM
>> To: [email protected]
>> Subject: Re: [iText-questions] Image transparency issues
>> related to printing PDF
>>
>> That addresses the PostScript issue . . . Level 2 does not
>> and can not
>> work! I can
>> live with that since very few of the huddled masses actually
>> use PostScript.
>>
>> However, regarding non-PostScript print drivers, which are in
>> the vast
>> majority, the
>> question still remains. . . . Why does transparency work for
>> 8-bit but
>> not bi-level?
>>
>> When you send a PDF out into the ether it is not realistic to assume
>> that the receiver has
>> the wherewithal to figure out how to select print as image! This may
>> sound ridiculous to
>> all us computer geeks but it is the reality!
>>
>> Is there some architectural reason why transparency doe not work for
>> bi-level image?
>> Have I coded the transparency specification incorrectly? Or
>> is this just
>> an artifact of the Adobe Reader?
>>
>> The workaround is it to use 8-bit instead of bi-level because
>> transparency appears to work with
>> 8-bit but not bi-level printing. However, that increases
>> the size of
>> the PDF
>> which is not an ideal result. The answer may remain the same, "live
>> with it!" but
>> thought I would ask.
>>
>> Thanks for the help.
>>
>> Sincerely,
>> Jerold Sampson
>>
>> Paulo Soares wrote:
>>
>>> This problem has nothing to do with iText. Only PostScript Level 3
>>> supports transparency (and all the other printer drivers
>>>
>> not postscript
>>
>>> based). You already have the solution, print to a PostScript Level 3
>>> printer, and the workaround, print as image.
>>>
>>> Paulo
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: [EMAIL PROTECTED]
>>>> [mailto:[EMAIL PROTECTED] On
>>>> Behalf Of Jerold Sampson
>>>> Sent: Thursday, November 09, 2006 3:22 PM
>>>> To: [email protected]
>>>> Subject: Re: [iText-questions] Image transparency issues
>>>> related to printing PDF
>>>>
>>>> I tried setting the PDF version but it has no effect on
>>>>
>> this problem.
>>
>>>> Thanks.
>>>>
>>>> Jerold Sampson
>>>>
>>>> porcupine wrote:
>>>>
>>>>
>>>>> Have you tried setting the PdfVersion? eg (java):
>>>>>
>>>>> writer.setPdfVersion(PdfWriter.VERSION_1_3);
>>>>>
>>>>> set this before you do document.open();
>>>>>
>>>>>
>>>>>
>>>>> Jerold Sampson wrote:
>>>>>
>>>>>
>>>>>
>>>>>> I am having problems printing PDF generated with iText.
>>>>>>
>>>>>>
>>>> The PDF views
>>>>
>>>>
>>>>>> correctly with the Adobe reader but must be printed using
>>>>>> PostScript Level 3 or as image. The default printing
>>>>>>
>>>>>>
>>>> modes result in
>>>>
>>>>
>>>>>> image transparency issues, i.e. overlapping images obscure each
>>>>>> other. I have treid many different permutations but can
>>>>>>
>>>>>>
>>>> not seem to get
>>>>
>>>>
>>>>>> around the problem. I am attaching a sample PDF file
>>>>>> stripped down to the offending page content. It views
>>>>>>
>>>>>>
>>>> fine but prints
>>>>
>>>>
>>>>>> incorrectly unless it is printed as image or
>>>>>> PostScript Level 3.
>>>>>>
>>>>>> I am nor clear on how to set the transparency mask and
>>>>>>
>>>>>>
>>>> have been using
>>>>
>>>>
>>>>>> more or less a trial and error method! . . . not my preferred
>>>>>> mode of operation. My lack of understanding on how this
>>>>>>
>>>>>>
>>>> parameter is
>>>>
>>>>
>>>>>> constructed and what it does may be the source of my problems.
>>>>>> The following code snippets are used to add the images
>>>>>>
>> to the page:
>>
>>>>>> if (gray) {
>>>>>> // 8-bit logic (0 black 255 white/transparent)
>>>>>>
>>>>>> int transparency[] = {255, 255};
>>>>>> pdfImage =
>>>>>>
>>>>>>
>>>>>>
>> com.lowagie.text.Image.getInstance(xSize,ySize,1,8,data,transparency);
>>
>>>>
>>>>
>>>>>> }
>>>>>>
>>>>>> the above views correctly and prints fine to
>>>>>>
>>>>>>
>>>> non-PostScript devices . .
>>>>
>>>>
>>>>>> . However when printing to PostScript Level 2 it fails.
>>>>>>
>>>>>>
>>>> (I use CutePDF
>>>>
>>>>
>>>>>> driver to test this)
>>>>>>
>>>>>> else {
>>>>>> // 1-bit logic (0 black 1 white/transparent)
>>>>>> //int transparency[] = {1, 1}; // does not work
>>>>>>
>>>>>>
>>>> ??? (does not
>>>>
>>>>
>>>>>> view or print correctly)
>>>>>> int transparency[] = {255, 255}; // views but
>>>>>>
>>>>>>
>>>> must print as
>>>>
>>>>
>>>>>> image
>>>>>> pdfImage = new
>>>>>>
>>>>>>
>>>> com.lowagie.text.ImgRaw(xSize,ySize,1,1,data);
>>>>
>>>>
>>>>>> pdfImage.setTransparency(transparency);
>>>>>> }
>>>>>>
>>>>>> The above views correctly but must be printed as image or
>>>>>>
>>>>>>
>>>> PostScript
>>>>
>>>>
>>>>>> Level 3. The transparency[] = {1,1; does not work as it should.
>>>>>>
>>>>>> I am attaching two 1 page PDFs. One is a bi-level image
>>>>>>
>>>>>>
>>>> the other is
>>>>
>>>>
>>>>>> 8-bit.
>>>>>>
>>>>>> This may be an Adobe reader issue but I would like to make
>>>>>>
>>>>>>
>>>> sure there is
>>>>
>>>>
>>>>>> not something
>>>>>> else lurking around this problem!
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Sincerely
>>>>>> Jerold Sampson
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> --------------------------------------------------------------
>>>> -----------
>>>> Using Tomcat but need to do more? Need to support web
>>>> services, security?
>>>> Get stuff done quickly with pre-integrated technology to make
>>>> your job easier
>>>> Download IBM WebSphere Application Server v.1.0.1 based on
>>>> Apache Geronimo
>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
>>>> dat=121642
>>>> _______________________________________________
>>>> iText-questions mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>>
>>>>
>>>>
>>> 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.
>>
>>>
>>>
>>>
>> --------------------------------------------------------------
>> ----------
>>
>>>
>> --------------------------------------------------------------
>> -----------
>>
>>> Using Tomcat but need to do more? Need to support web
>>>
>> services, security?
>>
>>> Get stuff done quickly with pre-integrated technology to
>>>
>> make your job easier
>>
>>> Download IBM WebSphere Application Server v.1.0.1 based on
>>>
>> Apache Geronimo
>>
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
>> dat=121642
>>
>> --------------------------------------------------------------
>> ----------
>>
>>> _______________________________________________
>>> iText-questions mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>>
>>>
>>
>> --------------------------------------------------------------
>> -----------
>> Using Tomcat but need to do more? Need to support web
>> services, security?
>> Get stuff done quickly with pre-integrated technology to make
>> your job easier
>> Download IBM WebSphere Application Server v.1.0.1 based on
>> Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
>> dat=121642
>> _______________________________________________
>> iText-questions mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>>
>
>
> 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.
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions