Oluşturmuş olduğunuz sayfanın Zoom özelliğinin sabit kalması için yazdığım bir method güle güle kullanın..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTextSharp.text.pdf;
using iTextSharp.text;
using iTextSharp.text.xml;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTextSharp.text.pdf;
using iTextSharp.text;
using iTextSharp.text.xml;
public void DocumentZoom(Document doc, string file,float zoomSize)
{
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(file, FileMode.Create));
PdfDestination pdfDest = new PdfDestination(PdfDestination.XYZ, 0, doc.PageSize.Height, zoomSize);
doc.Open();
PdfAction action = PdfAction.GotoLocalPage(1, pdfDest, writer);
writer.SetOpenAction(action);
doc.Close();
}
{
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(file, FileMode.Create));
PdfDestination pdfDest = new PdfDestination(PdfDestination.XYZ, 0, doc.PageSize.Height, zoomSize);
doc.Open();
PdfAction action = PdfAction.GotoLocalPage(1, pdfDest, writer);
writer.SetOpenAction(action);
doc.Close();
}
Hiç yorum yok:
Yorum Gönder