Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sat May 18, 2019 1:01 am

Hello,

I am trying to set the push button border but its not visible even after setting it up correctly. Can you please suggest? Below is the code
Code: Select all
PdfButtonField pushButton1 = new PdfButtonField(page0, "PushButton1")
            {
                ToolTip = "Testing of Push button",
                Bounds = new RectangleF(0, 0, 10, 10),
                BorderColor = Color.Aqua,
                BorderStyle = PdfBorderStyle.Underline,
                BorderWidth = 100f,
                ReadOnly = false,
                BackColor = Color.Beige,
                Export = true,
                Flatten = false,
                Font = fontpdf1,
                ForeColor = Color.Red,
                HighlightMode = PdfHighlightMode.Push,
                //IconLayout = pushButtonIconLayout.Spaces
                //Location = new PointF(50,50),
                LayoutMode = PdfButtonLayoutMode.IconOnly,
                MappingName = "Push Button",
                Required = false,
                //RolloverIcon
                //RolloverText
                //Size = new SizeF(10,10),
                Text = "Chintal",
                TextAlignment = PdfTextAlignment.Center,
                Visible = true
            };

            pushButton1.IconLayout.Spaces = new float[] { 25f, 10f };
            pushButton1.IconLayout.ScaleMode = PdfButtonIconScaleMode.Proportional;
            pushButton1.IconLayout.ScaleReason = PdfButtonIconScaleReason.IconIsBigger;
            pushButton1.IconLayout.IsFitBounds = false;
            pushButton1.Icon = PdfImage.FromFile(@"C:\PDFImages\_1.png");

            doc.Form.Fields.Add(pushButton1);

chintalpatel89
 
Posts: 16
Joined: Sun Dec 25, 2016 9:54 am

Mon May 20, 2019 6:47 am

Hello,

Thanks for your post.
After testing with our latest Spire.PDF Pack(Hot Fix) Version:5.5.1, the push button border of my generated PDF is visible, here I attached my result PDF for your reference. Thus, I suggest that you try again with the latest version. If your issue still occurs after trying, please share us with the following more information to help further look into it. You could send them to us via email ([email protected]).
1. Your generated PDF.
2. What is the PDF reader you used? If you open the files in Adobe Acrobat, will the issue still happen?
3. Your system configuration (E.g. Win 7, 64 bit).
4. Your region setting (E.g. China, Chinese).

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF