Spire.PDF 3.9.124 supports to add an icon for PdfButtonField and set the icon layout

Spire.PDF

We are glad to announce that the latest hotfix version of Spire.PDF 3.9.124 is available today. In this version, Spire.PDF supports to add an icon for PdfButtonField and detect if a document is a portfolio and also fixes several bugs when printing a PDF document. The list of new features and bug solutions are given below.

New Features:

  • Add IsPortfolio property for PdfDocument to detect if a PDF document is a portfolio.
  • bool value=PdfDocument.IsPortfolio;
    
  • Add new properties for PdfButtonField to handle button/Icon layout.
  • PdfButtonField btn = new PdfButtonField(page, "button1");
    btn.Bounds = new RectangleF(0, 0, 120, 100);
    //button layout
    btn.HighlightMode = PdfHighlightMode.Push;
    btn.LayoutMode = PdfButtonLayoutMode.CaptionOverlayIcon;
    btn.Text = "Normal Text";
    btn.Icon = PdfImage.FromFile("Image.png");
    btn.AlternateText = "Alternate Text";//only be set when PdfHighlightMode is set as Push
    btn.AlternateIcon = PdfImage.FromFile("PNG_transparency_demonstration_1.png");
    btn.RolloverText = "Rollover Text";//only be set when PdfHighlightMode is set as Push
    btn.RolloverIcon = PdfImage.FromFile("SpireOffice.png");
    //icon layout
    btn.IconLayout.Spaces = new float[] { 0.5f, 0.5f };
    btn.IconLayout.ScaleMode = PdfButtonIconScaleMode.Proportional;
    btn.IconLayout.ScaleReason = PdfButtonIconScaleReason.Always;
    btn.IconLayout.IsFitBounds = false;
    Pdf.Form.Fields.Add(btn);
    

Bug Solutions:

  • Fixes the issue that the position of extracted text was located incorrectly.
  • Fixes the issue that the rotated text was lost when printing.
  • Fixes the issue that the image was lost when printing.
  • Fixes the issue that the alignment of FormField changed when flattening FormField.
  • Fixes the issue that the content was lost when saving as Image.
  • Fixes the issue that underline/strikethrough appeared in the table when there is no text in the cell.
  • Fixes the issue that the PdfDestination(int pageNumber, PointF location, float zoom) constructor can't create bookmark.
  • Fixes the issue that caused the error "Insufficient data for an image" when replacing Image with ReplaceImage method.
  • Fixes the issue that the barcode appearance was incorrect when printing.

To enjoy a better experience of Spire.PDF 3.9.124, please download from:

https://www.e-iceblue.com/Download/download-pdf-for-net-now.html

More information of Spire.PDF new release or hotfix:

https://www.e-iceblue.com/forum/spire-pdf-new-release-or-hotfix-t4704.html