Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Watermark behind filled form field

New Here ,
Nov 06, 2019 Nov 06, 2019

Is there a way to make a watermark show on top of a form field (text, button, etc.) that has a fill color specified? I've played around with the watermark settings, but no matter what I do it shows behind the form field.

 

I attached a sample PDF demonstrating the behavior I'm seeing.

 

I'm using Acrobat Pro DC 2019.021.20049 on Windows 10.

TOPICS
Create PDFs , Edit and convert PDFs , General troubleshooting , How to , PDF forms
3.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2019 Nov 06, 2019

No, this is not possible. Watermarks are page content, and form fields are annotations. Annotations are always drawn on top of page content. 

Why do you want this?  

You can force form fields to draw on top of one another, so you could place a button with an image on it above the form field.

Or you could simply hide the form field.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 06, 2019 Nov 06, 2019

Hi Thom,

 

Thanks for the reply.

 

I created the watermark with the "fixed size" option selected which generates it as an annotation. If you dig into the document structure (under the "Content" tab of the left-side navigation pane), the watermark is listed under "Annotations".

 

Here's the use case - we have a customer with a 3D PDF document. They have a text form field with a white background placed on top of the 3D annotation that's used to display approval names/dates. When the approval status changes, an API call is made to the watermark service to place a watermark on the white text field. The field needs to have a white background so that the 3D model behind it doesn't interfere with the approval text. In this case, the watermark is being placed behind the white text field instead of in front of it, so it's not visible.

 

In general, I don't love placing form fields on top of the 3D annotation, which is really why we have this issue. But the customer doesn't want to change the doc layout, which is why I'm looking for a workaround.

 

Thanks,
Axel

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2019 Nov 06, 2019

It may be an annotation, but it's being drawn before the form fields. If you want an image to appear on top of the text field, you'll need another field.  Use a Button field to display your image. Create it up front, so you know is drawing position, and make it hidden, then you'll only need to unhide it. This is a much better strategy all around than adding a watermark.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 06, 2019 Nov 06, 2019

Okay, thanks.

 

The approval text needs to be updated dynamically with a name and date that aren't known when the doc is initially created. That's why the watermark API call was used. I guess another approach would be to make API calls to add the names/dates as custom document properties. The doc JS could then check the properties on load and set the value of those fields if the custom properties have been added. I might explore that instead.

 

Thanks for the help - I've referenced other answers/articles of yours countless times. Always appreciated.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2019 Nov 06, 2019
LATEST

Glad you liked the articles, thanks 🙂

 

if it's just text, then use a text field for the overlay, it you require text and graphics, maybe two fields will work. A button for the image and text field.

 

Another option is to dynamically create the text and graphics in a button. There is an undocumented function that will work for this, but it will only work with vector graphics, no raster image. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines