You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Baskar Murugan <ba...@gmail.com> on 2019/09/20 07:20:26 UTC

Need Help on Check Box Background Color

 Hi Team,

Is there any other class files are there to change the border / fill the
background of the checkbox which is in pdf form filed. I need to highlight
fields either form field / check box field. I changed the background color
for the text box but I couldn't able to change the background color for the
check box. Is there any other way to change background color and color for
check box?. If any help on this would be greatly appreciated...

Re: Need Help on Check Box Background Color

Posted by Dick Martin <rt...@nycap.rr.com>.
I saw a response from Tilman that same day.  Check your spam or trash
folder.

On Tue, Sep 24, 2019 at 9:01 AM Baskar Murugan <ba...@gmail.com>
wrote:

>  Hi Team,
>
> I already send the mail about this.But still no response from your side
>
> Is there any other class files are there to change the border / fill the
> background of the checkbox which is in pdf form filed. I need to highlight
> fields either form field / check box field. I changed the background color
> for the text box but I couldn't able to change the background color for the
> check box. Is there any other way to change background color and color for
> check box?. If any help on this would be greatly appreciated...
>
>
>
>
>
> On Fri, Sep 20, 2019 at 12:50 PM Baskar Murugan <ba...@gmail.com>
> wrote:
>
> > Hi Team,
> >
> > Is there any other class files are there to change the border / fill the
> > background of the checkbox which is in pdf form filed. I need to
> highlight
> > fields either form field / check box field. I changed the background
> color
> > for the text box but I couldn't able to change the background color for
> the
> > check box. Is there any other way to change background color and color
> for
> > check box?. If any help on this would be greatly appreciated...
> >
>

Fwd: Need Help on Check Box Background Color

Posted by Baskar Murugan <ba...@gmail.com>.
Thanks for your response.

I used pdfbox JAR in my ColdFusion application, Based on
PDAppearanceCharacteristicsDictionary class I changed the background color
and border color for text box and checkbox, It's working fine.

But the problem with the browser, I need to show the pdf preview on the
chrome, FireFox, edge. But chrome doesn't change the background and border
color for the checkbox. Chrome changed the TextBox background only while
clicking the field.

Here I attached images of my issue with the browser version.

Microsoft Edge 41.16299.248.0:

PDF rendered correctly with the formatted way. From Edge 42, it highlighted
the text box only. Didn't work for checkboxes.

[image: edgePdf_44.PNG]


Chrome

PDF was not get viewed with the high-lightened option for all the fields.

[image: Chrome.PNG]


Adobe Reader DX:

The application only with adobe acrobat reader DC 19.012.20040 shows the
correct format of pdf with highlighted option for all the fields. Other
than this version, some of them woks only for text boxes.

[image: adobeReaderDC.PNG]

There is another way in pdf box to change the background and borderColor to
preview in all the browser compatibility. I need like below attached image
for all the three browser
[image: edgeOutPutwithTextCheckbox.PNG]

If any help on this will greatly appreciated..









On Tue, Sep 24, 2019 at 10:38 PM Tilman Hausherr <TH...@t-online.de>
wrote:

> Hi,
> Your question was answered. Were you subscribed to the mailing list? If
> not, the answer can be found here:
> https://mail-archives.apache.org/mod_mbox/pdfbox-users/
> Tilman
>
> Am 24.09.2019 um 14:27 schrieb Baskar Murugan:
> >   Hi Team,
> >
> > I already send the mail about this.But still no response from your side
> >
> > Is there any other class files are there to change the border / fill the
> > background of the checkbox which is in pdf form filed. I need to
> highlight
> > fields either form field / check box field. I changed the background
> color
> > for the text box but I couldn't able to change the background color for
> the
> > check box. Is there any other way to change background color and color
> for
> > check box?. If any help on this would be greatly appreciated...
> >
> >
> >
> >
> >
> > On Fri, Sep 20, 2019 at 12:50 PM Baskar Murugan <
> baskarboss5493@gmail.com>
> > wrote:
> >
> >> Hi Team,
> >>
> >> Is there any other class files are there to change the border / fill the
> >> background of the checkbox which is in pdf form filed. I need to
> highlight
> >> fields either form field / check box field. I changed the background
> color
> >> for the text box but I couldn't able to change the background color for
> the
> >> check box. Is there any other way to change background color and color
> for
> >> check box?. If any help on this would be greatly appreciated...
> >>
>
>

Re: Need Help on Check Box Background Color

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,

You need to share the PDF. I ran the CreateCheckBox.java example and was 
able to see the red/yellow on Firefox and Chrome.

=> Try this yourself and see if it works. If yes, then something is 
different with your file. You can look at it with PDFDebugger, or share 
it here (don't attach! Upload to sharehoster) for analysis

Tilman


Am 25.09.2019 um 10:26 schrieb Baskar Murugan:
> Thanks for your response.
>
> I used pdfbox JAR in my ColdFusion application, Based on 
> PDAppearanceCharacteristicsDictionary class I changed the background 
> color and border color for text box and checkbox, It's working fine.
>
> But the problem with the browser, I need to show the pdf preview on 
> the chrome, FireFox, edge. But chrome doesn't change the background 
> and border color for the checkbox. Chrome changed the TextBox 
> background only while clicking the field.
>
> Here I attached images of my issue with the browser version.
>
> Microsoft Edge 41.16299.248.0:
>
> PDF rendered correctly with the formatted way. From Edge 42, it 
> highlighted the text box only. Didn't work for checkboxes.
>
> edgePdf_44.PNG
>
>
> Chrome
>
> PDF was not get viewed with the high-lightened option for all the fields.
>
> Chrome.PNG
>
>
> Adobe Reader DX:
>
> The application only with adobe acrobat reader DC 19.012.20040 shows 
> the correct format of pdf with highlighted option for all the fields. 
> Other than this version, some of them woks only for text boxes.
>
> adobeReaderDC.PNG
>
> There is another way in pdf box to change the background and 
> borderColor to preview in all the browser compatibility. I need like 
> below attached image for all the three browser
> edgeOutPutwithTextCheckbox.PNG
>
> If any help on this will greatly appreciated..
>
>
>
>
>
>
>
>
>
> On Tue, Sep 24, 2019 at 10:38 PM Tilman Hausherr 
> <THausherr@t-online.de <ma...@t-online.de>> wrote:
>
>     Hi,
>     Your question was answered. Were you subscribed to the mailing
>     list? If
>     not, the answer can be found here:
>     https://mail-archives.apache.org/mod_mbox/pdfbox-users/
>     Tilman
>
>     Am 24.09.2019 um 14:27 schrieb Baskar Murugan:
>     >   Hi Team,
>     >
>     > I already send the mail about this.But still no response from
>     your side
>     >
>     > Is there any other class files are there to change the border /
>     fill the
>     > background of the checkbox which is in pdf form filed. I need to
>     highlight
>     > fields either form field / check box field. I changed the
>     background color
>     > for the text box but I couldn't able to change the background
>     color for the
>     > check box. Is there any other way to change background color and
>     color for
>     > check box?. If any help on this would be greatly appreciated...
>     >
>     >
>     >
>     >
>     >
>     > On Fri, Sep 20, 2019 at 12:50 PM Baskar Murugan
>     <baskarboss5493@gmail.com <ma...@gmail.com>>
>     > wrote:
>     >
>     >> Hi Team,
>     >>
>     >> Is there any other class files are there to change the border /
>     fill the
>     >> background of the checkbox which is in pdf form filed. I need
>     to highlight
>     >> fields either form field / check box field. I changed the
>     background color
>     >> for the text box but I couldn't able to change the background
>     color for the
>     >> check box. Is there any other way to change background color
>     and color for
>     >> check box?. If any help on this would be greatly appreciated...
>     >>
>


Re: Need Help on Check Box Background Color

Posted by Baskar Murugan <ba...@gmail.com>.
Thanks for your response.

I used pdfbox JAR in my ColdFusion application, Based on
PDAppearanceCharacteristicsDictionary class I changed the background color
and border color for text box and checkbox, It's working fine.

But the problem with the browser, I need to show the pdf preview on the
chrome, FireFox, edge. But chrome doesn't change the background and border
color for the checkbox. Chrome changed the TextBox background only while
clicking the field.

Here I attached images of my issue with the browser version.

Microsoft Edge 41.16299.248.0:

PDF rendered correctly with the formatted way. From Edge 42, it highlighted
the text box only. Didn't work for checkboxes.

[image: edgePdf_44.PNG]


Chrome

PDF was not get viewed with the high-lightened option for all the fields.

[image: Chrome.PNG]


Adobe Reader DX:

The application only with adobe acrobat reader DC 19.012.20040 shows the
correct format of pdf with highlighted option for all the fields. Other
than this version, some of them woks only for text boxes.

[image: adobeReaderDC.PNG]

There is another way in pdf box to change the background and borderColor to
preview in all the browser compatibility. I need like below attached image
for all the three browser
[image: edgeOutPutwithTextCheckbox.PNG]

If any help on this will greatly appreciated..









On Tue, Sep 24, 2019 at 10:38 PM Tilman Hausherr <TH...@t-online.de>
wrote:

> Hi,
> Your question was answered. Were you subscribed to the mailing list? If
> not, the answer can be found here:
> https://mail-archives.apache.org/mod_mbox/pdfbox-users/
> Tilman
>
> Am 24.09.2019 um 14:27 schrieb Baskar Murugan:
> >   Hi Team,
> >
> > I already send the mail about this.But still no response from your side
> >
> > Is there any other class files are there to change the border / fill the
> > background of the checkbox which is in pdf form filed. I need to
> highlight
> > fields either form field / check box field. I changed the background
> color
> > for the text box but I couldn't able to change the background color for
> the
> > check box. Is there any other way to change background color and color
> for
> > check box?. If any help on this would be greatly appreciated...
> >
> >
> >
> >
> >
> > On Fri, Sep 20, 2019 at 12:50 PM Baskar Murugan <
> baskarboss5493@gmail.com>
> > wrote:
> >
> >> Hi Team,
> >>
> >> Is there any other class files are there to change the border / fill the
> >> background of the checkbox which is in pdf form filed. I need to
> highlight
> >> fields either form field / check box field. I changed the background
> color
> >> for the text box but I couldn't able to change the background color for
> the
> >> check box. Is there any other way to change background color and color
> for
> >> check box?. If any help on this would be greatly appreciated...
> >>
>
>

Re: Need Help on Check Box Background Color

Posted by Baskar Murugan <ba...@gmail.com>.
 Hi Team,

I already send the mail about this.But still no response from your side

Is there any other class files are there to change the border / fill the
background of the checkbox which is in pdf form filed. I need to highlight
fields either form field / check box field. I changed the background color
for the text box but I couldn't able to change the background color for the
check box. Is there any other way to change background color and color for
check box?. If any help on this would be greatly appreciated...





On Fri, Sep 20, 2019 at 12:50 PM Baskar Murugan <ba...@gmail.com>
wrote:

> Hi Team,
>
> Is there any other class files are there to change the border / fill the
> background of the checkbox which is in pdf form filed. I need to highlight
> fields either form field / check box field. I changed the background color
> for the text box but I couldn't able to change the background color for the
> check box. Is there any other way to change background color and color for
> check box?. If any help on this would be greatly appreciated...
>

Re: Need Help on Check Box Background Color

Posted by Tilman Hausherr <TH...@t-online.de>.
Please have a look at the CreateCheckBox.java example. This is done with 
the PDAppearanceCharacteristicsDictionary:

PDAppearanceCharacteristicsDictionary appearanceCharacteristics = new 
PDAppearanceCharacteristicsDictionary(new COSDictionary());
appearanceCharacteristics.setBorderColour(new PDColor(new float[]{1, 0, 
0}, PDDeviceRGB.INSTANCE)); // red
appearanceCharacteristics.setBackground(new PDColor(new float[]{1, 1, 
0}, PDDeviceRGB.INSTANCE)); // yellow
widget.setAppearanceCharacteristics(appearanceCharacteristics);

These values are then used when the appearance streams are created.

Tilman

Am 20.09.2019 um 09:20 schrieb Baskar Murugan:
>   Hi Team,
>
> Is there any other class files are there to change the border / fill the
> background of the checkbox which is in pdf form filed. I need to highlight
> fields either form field / check box field. I changed the background color
> for the text box but I couldn't able to change the background color for the
> check box. Is there any other way to change background color and color for
> check box?. If any help on this would be greatly appreciated...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org