Sair
  • Comunidade global
    • Idioma:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

If no logo is uploaded, how do I make the image box (icon) not print?

Novato ,
May 22, 2018 May 22, 2018

I have and editable PDF with text fields and an image field. I have a custom icon in the image field so end-users know where to click to upload their own image. If they do NOT upload an image the icon still prints. How do I change it so the icon will not print if they upload an image? Thanks!

TÓPICOS
PDF forms
743
Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines
1 SOLUÇÃO ACEITE
Community Expert ,
May 22, 2018 May 22, 2018

You can't interact with a hidden field. Set it as "visible but doesn't print" and use this code as its MouseUp script

if (event.target.buttonImportIcon()==0) event.target.display = display.visible;

Ver solução na publicação original

Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines
LENDA ,
May 22, 2018 May 22, 2018

I would set the display property for the image field to "display no print". This should be available on the field's property pop-up window.

Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines
Community Expert ,
May 22, 2018 May 22, 2018

But then it won't print even if the user selected an image... You would need to adjust the code that imports the image to also change the field's display property.

Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines
Novato ,
May 22, 2018 May 22, 2018

I even tried "Hidden but Printable" but there's nothing there to click to upload and image. I don't even see a finger/hand when I roll over it that there's a field there. The only thing that I found that works is to use the default icon only and not use a custom design icon. But I really want my little "place image here" custom icon...

Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines
Community Expert ,
May 22, 2018 May 22, 2018

You can't interact with a hidden field. Set it as "visible but doesn't print" and use this code as its MouseUp script

if (event.target.buttonImportIcon()==0) event.target.display = display.visible;

Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines
Novato ,
May 22, 2018 May 22, 2018
MAIS RECENTE

YES!!!!!! Thank you! That worked! I combined your code with another I found to make the stroke and fill transparent as well. This is what I used and it's perfect!!

  1. if (event.target.buttonImportIcon()==0) { 
  2.     event.target.lineWidth = 0; 
  3.     event.target.strokeColor = color.transparent; 
  4.     event.target.fillColor = color.transparent; 
  5.     event.target.display = display.visible  
  6. }
Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines