אנחנו שמחים להודיע על השחרור של GroupDocs.Viewer for Python 26.9, זמין החל מ-ספטמבר 2026. שחרור זה משדרג את מנוע GroupDocs.Viewer הבסיסי מ‑26.4 ל‑26.8, מוסיף תמיכה ברינדור קבצי Microsoft Project ב‑Linux וב‑macOS, מציג שליטה במספרי עמודים וברזולוציה עבור מסמכי Word, מסיר את התלות ב‑libgdiplus בפלטפורמות שאינן Windows, ומשחזר תאימות ל‑Python 3.5–3.7. זמן הריצה המוטמע של .NET עודכן ל‑10.0.12, וה‑API של Python כולל כעת docstrings מלאים עם דוגמאות קוד.

מה חדש במהדורה זו

  • [Feature] הוספת WordProcessingOptions.page_number_location וה‑enum WordsPageNumberLocation להדפסת מספרי עמודים על מסמכי Word שעברו רינדור (VIEWERPYTHON-153)
  • [Feature] הוספת WordProcessingOptions.horizontal_resolution / vertical_resolution להגדרת DPI של פלט PNG ו‑JPEG עבור מסמכי Word (VIEWERPYTHON-154)
  • [Feature] הוספת תמיכה ברינדור קבצי Microsoft Project (MPP, MPT, MPX) ב‑Linux וב‑macOS (VIEWERPYTHON-155)
  • [Enhancement] עדכון מנוע GroupDocs.Viewer מ‑26.4 ל‑26.8 (VIEWERPYTHON-156)
  • [Enhancement] עדכון זמן הריצה המוטמע של .NET מ‑10.0.0 ל‑10.0.12 (VIEWERPYTHON-157)
  • [Enhancement] הסרת דרישת libgdiplus / mono-libgdiplus ב‑Linux וב‑macOS (VIEWERPYTHON-158)
  • [Enhancement] אספקת אותו API של Python בכל פלטפורמה — חבילות Linux ו‑macOS מקבלות ProjectManagementOptions ואת החברים FileType של Project, Photoshop, Illustrator ו‑OneNote (VIEWERPYTHON-159)
  • [Enhancement] הוספת docstrings עם תקצירים, פרמטרים ודוגמאות קוד ל‑API של Python (VIEWERPYTHON-160)
  • [Enhancement] הוספת סעיף מדריך למפתחים לתיעוד ה‑API (VIEWERPYTHON-161)
  • [Fix] אי‑יכולת להשתמש בחבילה ב‑Python 3.5 – 3.7 (VIEWERPYTHON-162)
  • [Fix] pip מתקין את החבילה בגרסאות Linux ו‑macOS שאינן יכולות להריץ אותה (VIEWERPYTHON-163)

שינויים בממשק API ציבורי

שום דבר לא הוסר או שונה שם.

סוגים חדשים

סוג מודול תיאור
WordsPageNumberLocation groupdocs.viewer.options היכן להדפיס מספרי עמודים על מסמך Word שעבר רינדור: NOT_APPLY (ברירת מחדל), TOP_LEFT, TOP_CENTER, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT

חברים חדשים במחלקות קיימות

מחלקה חבר תיאור
WordProcessingOptions page_number_location מספרי עמודים ליישום בזמן הרינדור (WordsPageNumberLocation)
WordProcessingOptions horizontal_resolution DPI אופקי של פלט PNG / JPEG, 72 – 600 (ברירת מחדל 96)
WordProcessingOptions vertical_resolution DPI אנכי של פלט PNG / JPEG, 72 – 600 (ברירת מחדל 96)

חדש ב‑Linux וב‑macOS

ProjectManagementOptions, BaseViewOptions.project_management_options ו‑FileType.MPP, MPT, MPX, PSD, PSB, AI, ONE היו זמינים כבר ב‑Windows וכעת זמינים גם בחבילות Linux ו‑macOS — ראו API Python אחד על כל פלטפורמה.

תכונות חדשות

קבצי Microsoft Project ב‑Linux וב‑macOS

קבצי MPP, MPT ו‑MPX היו ניתנים לרינדור רק ב‑Windows; ב‑Linux וב‑macOS הם נכשלו עם Failed to detect file type. מנוע 26.8 רינדר אותם בכל פלטפורמה, עם אותו ProjectManagementOptions כמו ב‑Windows:

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import HtmlViewOptions, TimeUnit

with Viewer("project.mpp") as viewer:
    options = HtmlViewOptions.for_embedded_resources("page_{0}.html")
    options.project_management_options.time_unit = TimeUnit.DAYS
    viewer.view(options)

ב‑Linux, יש להתקין תחילה את גופני Microsoft core (ttf-mscorefonts-installer): ללא גופנים אלה רינדור הפרויקט נכשל עם Cannot find fallback font 'Generic Sans Serif', והחלופות התואמות מדד (כגון Liberation) אינן מספקות את החיפוש הזה.

מספרי עמודים במסמכי Word שעברו רינדור

WordProcessingOptions.page_number_location מדפיס מספרי עמודים על מסמך Word בזמן הרינדור, גם אם המסמך עצמו אינו מכיל מספרים. ניתן לבחור באחת משש המיקומים מה‑enum החדש WordsPageNumberLocation; ברירת המחדל, NOT_APPLY, משאירה את המסמך כפי שהוא.

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PdfViewOptions, WordsPageNumberLocation

with Viewer("document.docx") as viewer:
    options = PdfViewOptions("output.pdf")
    options.word_processing_options.page_number_location = WordsPageNumberLocation.BOTTOM_CENTER
    viewer.view(options)

רזולוציית פלט PNG ו‑JPEG למסמכי Word

WordProcessingOptions.horizontal_resolution ו‑vertical_resolution מגדירים את ה‑DPI של התמונות המיוצרות ממסמכי Word. ברירת המחדל היא 96 DPI; ערכים מחוץ לטווח 72 – 600 DPI יוגבלו לטווח זה.

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PngViewOptions

with Viewer("document.docx") as viewer:
    options = PngViewOptions("page_{0}.png")
    options.word_processing_options.horizontal_resolution = 300
    options.word_processing_options.vertical_resolution = 300
    viewer.view(options)

אין יותר libgdiplus

חבילות Linux ו‑macOS רונדות דרך SkiaSharp ו‑Aspose.Drawing, שנכללות בתוך ה‑wheel. הן לעולם אינן קוראות ל‑libgdiplus: כל דוגמה מתועדת עוברת במכולת Linux שאין בה גם libgdiplus וגם את תלויות הגרפיקה שלו. הסירו את libgdiplus / mono-libgdiplus מתמונותיכם וסקריפטי הפרוביז’ן.

API Python אחד על כל פלטפורמה

בגרסאות קודמות חבילות Linux ו‑macOS חשפו API מצומצם יותר מזה של Windows. ב‑26.9 נשלח אותו API בכל מקום, כך שקוד שנכתב על פי התיעוד מיובא בכל פלטפורמה. חבילות Linux ו‑macOS מקבלות ProjectManagementOptions ואת החברים FileType.MPP, MPT ו‑MPX, שעובדים שם גם.

הן גם מקבלות FileType.PSD, PSB, AI ו‑ONE. פורמטים אלה נשארים זמינים רק ב‑Windows, וב‑Linux וב‑macOS גישה לאחד מחברים אלו תגרום ל‑GroupDocsViewerException: Member 'GroupDocs.Viewer.FileType.PSD' not found. כדי לקבוע בזמן ריצה האם פורמט ניתן לרינדור, יש לבדוק FileType.get_supported_file_types(), שמחזיר רק את מה שהמנוע הרץ תומך בו:

from groupdocs.viewer import FileType

supported = {file_type.extension for file_type in FileType.get_supported_file_types()}
print(".psd" in supported)   # True on Windows, False on Linux and macOS
print(".mpp" in supported)   # True everywhere

דוגמת קוד

כדי לרנדר קובץ Microsoft Project ב‑Linux או macOS עם יחידות זמן יומיות:

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import HtmlViewOptions, TimeUnit

with Viewer("project.mpp") as viewer:
    options = HtmlViewOptions.for_embedded_resources("page_{0}.html")
    options.project_management_options.time_unit = TimeUnit.DAYS
    viewer.view(options)

כדי להוסיף מספרי עמודים למסמך Word ולרנדר ל‑PDF:

from groupdocs.viewer import Viewer
from groupdocs.viewer.options import PdfViewOptions, WordsPageNumberLocation

with Viewer("document.docx") as viewer:
    options = PdfViewOptions("output.pdf")
    options.word_processing_options.page_number_location = WordsPageNumberLocation.BOTTOM_CENTER
    viewer.view(options)

איך לקבל את העדכון

PyPI

שדרגו לחבילה האחרונה דרך PyPI:

pip install groupdocs-viewer-net==26.9.0

הורדה ישירה

הורידו קבצי wheel לכל הפלטפורמות מהדף GroupDocs.Viewer for Python via .NET 26.9.

משאבים