الصفحة

المعلومات العامة

Page هو نوع في Aspose.PDF FOSS ل Go.

الصفحة هي عرض مباشر لصفحة واحدة داخل وثيقة.

يوفر هذا النوع 45 طريقة للعمل مع كائنات الصفحة في برامج Go. المنهجيات المتاحة تشمل: AddImage, AddImageFromStream, AddSVG, AddSVGFromStream, AddSVGObject, AddStamp, AddTOC, AddTable, AddText, Annotations, ArtBox, BleedBox,، و 33 طريقة إضافية. جميع أعضاء الجمهور يمكن الوصول إليهم من أي تطبيق Go بعد تثبيت حزمة Aspose.PDF FOSS for Go.

الطرق

التوقيعوصف
RenderBMP(w: io.Writer, opts: RenderOptions)errorRenderBMP يقوم بتصوير الصفحة ويكتبها كـ BMP غير مضغوطة.
ExtractImages()([]Image, error)ExtractImages يعيد كل الصور الموجودة على الصفحة.
ImageInfos()([]ImageInfo, error)ImageInfos يعيد البيانات المتحولة لجميع الصور الموجودة على الصفحة دون فك بيانات بكسل.
AddImage(path: string, rect: Rectangle)errorAddImage يضيف صورة من ملف إلى الصفحة داخل المستطيل المعين.
AddImageFromStream(r: io.Reader, rect: Rectangle)errorAddImageFromStream يضيف صورة من قارئ إلى الصفحة داخل المستطيل المعين.
Number()intالرقم يعيد رقم الصفحة القائم على 1 داخل الوثيقة.
Annotations()*AnnotationCollectionتعليقات يعيد مجموعة التعليق من الصفحة.
Size()(PageSize, error)Size يعيد أبعاد الصفحة من MediaBox.
Rotation()RotationAngleالدوران يعيد التدوير الفعلي للصفحة بالدرجات (0, 90, 180, 270).
MediaBox()(Rectangle, error)MediaBox يعيد الصفحة MediaBox كمنطقة مستطيلة في الفضاء المستخدم PDF.
CropBox()(Rectangle, error)CropBox يعيد مربع التقطيع للصفحة كإمطال.
TrimBox()(Rectangle, error)TrimBox يعيد مربع التصفية للصفحة كقطعة مستطيلة.
BleedBox()(Rectangle, error)BleedBox يعيد مربع الصفحة كقطاع مستطيل.
ArtBox()(Rectangle, error)ArtBox يعيد مربع الصفحة الرسمي كقطاع مستطيل.
SetMediaBox(rect: Rectangle)errorSetMediaBox يحدد صفحة MediaBox (المستطيل الكامل للصفحة) في مساحة المستخدم PDF.
SetCropBox(rect: Rectangle)errorSetCropBox يحدد صفحة CropBox (المنطقة المرئية).
SetTrimBox(rect: Rectangle)errorSetTrimBox يحدد الصفحة TrimBox (البعاد المقصودة النهائية).
SetBleedBox(rect: Rectangle)errorSetBleedBox يحدد الصفحة BleedBox (منطقة الإنتاج).
SetArtBox(rect: Rectangle)errorSetArtBox يحدد صفحة ArtBox (المحتوى المفيد).
SetPageSize(width: float64)errorSetPageSize يغير حجم الصفحة عن طريق تعيين MediaBox إلى [ 0 0 عرض ارتفاع] (نقاط).
Label()stringتعيد العلامة صفحة الصفحات المنسق لهذه الصفة كما هو محدد من خلال شجرة رقم /PageLabels للوثيقة (مواصفات PDF §12.4.2).
RenderImage(opts: RenderOptions)(image.Image, error)RenderImage يُعدّ الصفحة إلى * image.RGBA في DPI المطلوب.
RenderPNG(w: io.Writer, opts: RenderOptions)errorRenderPNG يقوم بتصوير الصفحة ويكتبها PNG.
RenderJPEG(w: io.Writer, opts: RenderOptions, quality: int)errorRenderJPEG يقوم بتصوير الصفحة ويكتبها كـ JPEG.
RenderGIF(w: io.Writer, opts: RenderOptions)errorRenderGIF يقوم بتصوير الصفحة ويكتبها كشكل GIF (256 لونًا، مُعَدَّدًة كمية).
ReplaceText(old: string, opts: ...ReplaceOptions)(int, error)ReplaceText يحل محل كل حالة من النسخة القديمة مع التغيير في الصفحة ويعيد عدد التغيرات التي تم إجراؤها.
AddStamp(s: Stamp)errorAddStamp يُرسّم طابعًا على الصفحة.
AddSVG(path: string, rect: Rectangle)errorتقوم AddSVG بقراءة ملف SVG وتصويره إلى المستطيل المعطى على الصفحة.
AddSVGFromStream(r: io.Reader, rect: Rectangle)errorAddSVGFromStream يُظهر SVG من أي io.Reader في المستطيل المعطى على الصفحة.
AddSVGObject(svg: *SVG, rect: Rectangle)errorيُعطي AddSVGObject SVG مسبقاً إلى المستطيل المعطى على الصفحة.
AddTable(t: *Table, rect: Rectangle)(int, error)AddTable يُظهر الجدول داخل المستطيل المعطى.
ExtractText()(string, error)ExtractText يعيد محتوى النص من الصفحة.
AddText(text: string, style: TextStyle, rect: Rectangle)errorAddText يرسم النص داخل المستطيل باستخدام الأسلوب المعطى.
ExtractTextWithLayout()([]TextLine, error)ExtractTextWithLayout يعيد خطوط النص المهيكلة التي تم فرزها في ترتيب القراءة المرئي (من الأعلى إلى الأسفل، من اليسار إلى اليمين).
SearchText(query: string, opts: ...SearchOptions)([]TextMatch, error)SearchText يجد كل حالة استفسار على الصفحة ويعيد المطابقات في ترتيب القراءة المرئية (من الأعلى إلى الأسفل، من اليسار إلى اليمين).
RenderTIFF(w: io.Writer, opts: RenderOptions)errorRenderTIFF يقوم بتصوير الصفحة ويكتبها كصفحة واحدة من TIFM المتخفضة.
AddTOC(entries: []TOCEntry, rect: Rectangle, opts: ...TOCOptions)(int, error)يقدم AddTOC جدول محتويات من قائمة مدوّنة من الإدخالات في هذا الصفحة.
DrawLine(from: Point, style: LineStyle)errorDrawLine يضع شريحة خط واحدة من→ إلى مع النمط المحدد.
DrawRectangle(rect: Rectangle, style: ShapeStyle)errorDrawRectangle يضرب و/أو يملأ مستطيل متوافق مع المحور.
DrawCircle(center: Point, radius: float64, style: ShapeStyle)errorDrawCircle يضرب و / أو يملأ دائرة.
DrawEllipse(center: Point, rx: float64, style: ShapeStyle)errorDrawEllipse يضرب و/أو يملأ إصطلاح محور.
DrawPolyline(points: []Point, style: LineStyle)errorDrawPolyline يضع خط متعدد الخطوط المفتوح (النقاط الأولى والأخيرة غير متصلة).
DrawPath(path: *Path, style: ShapeStyle)errorDrawPath يضرب و / أو يملأ المسار الذي تم بناؤه سابقاً.
DrawRoundedRectangle(rect: Rectangle, radius: float64, style: ShapeStyle)errorDrawRoundedRectangle يضرب و/أو يملأ مستطيل متوافق مع المحور بأزرار مستديرة من الشعاع المحدد.
DrawPolygon(points: []Point, style: ShapeStyle)errorDrawPolygon يضرب و / أو ملء متعددة الأطراف مغلقة (النقطة الأخيرة تتصل مرة أخرى إلى أول عبر h).

انظر أيضاً

 العربية