PdfFileEditor.ResizeContentsPct

ResizeContentsPct(Stream, Stream, int[], double, double)

Belge sayfalarının içeriğini yeniden boyutlandırır. Sayfa içeriğini küçültür ve kenar boşlukları ekler. Yeni içerik boyutu yüzde olarak belirtilir.

public bool ResizeContentsPct(Stream source, Stream destination, int[] pages, double newWidth, 
    double newHeight)
ParametreTürAçıklama
sourceStreamKaynak belgeyi içeren akış.
destinationStreamSonuç belgesinin kaydedileceği akış.
pagesInt32[]Sayfa indekslerinin dizisi. Null ise tüm belge sayfaları işlenecektir.
newWidthDoubleSayfa içeriğinin yeni genişliği yüzde olarak.
newHeightDoubleSayfa içeriğinin yeni yüksekliği yüzde olarak.

Dönüş Değeri

Başarıyla yeniden boyutlandırıldıysa true.

Örnekler

PdfFileEditor fileEditor = new PdfFileEditor();
Stream src = new Stream("input.pdf", FileMode.Open);
Stream dest = new Stream("output.pdf", FileMode.Create);
fileEditor.ResizePct(src, dest, 
//resize all pages of document
null, 
//new contents width = 60% of initial size
60, 
//new contents height = 60% of initial size
60);
// Rest area of page will be empty (page margins).  Size of left and right margins is (100% - 60%) / 2 = 20%
// The same for top and bottom margins.

Ayrıca Bakınız


ResizeContentsPct(string, string, int[], double, double)

Belge sayfalarının içeriğini yeniden boyutlandırır. Sayfa içeriğini küçültür ve kenar boşlukları ekler. Yeni içerik boyutu yüzde olarak belirtilir.

public bool ResizeContentsPct(string source, string destination, int[] pages, double newWidth, 
    double newHeight)
ParametreTürAçıklama
sourceStringKaynak belgeye giden yol.
destinationStringSonuç belgesinin kaydedileceği yol.
pagesInt32[]Sayfa indekslerinin dizisi. Null ise tüm belge sayfaları işlenecektir.
newWidthDoubleSayfa içeriğinin yeni genişliği yüzde olarak.
newHeightDoubleSayfa içeriğinin yeni yüksekliği yüzde olarak.

Dönüş Değeri

Yeniden boyutlandırma başarılıysa true.

Örnekler

PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.ResizePct("input.pdf", "output.pdf",
//resize all pages of document
null, 
//new contents width = 60% of initial size
60, 
//new contents height = 60% of initial size
60);
// Rest area of page will be empty (page margins).  Size of left and right margins is (100% - 60%) / 2 = 20%
// The same for top and bottom margins.

Ayrıca Bakınız