Rank: Newbie
Groups: Registered
Joined: 12/8/2020(UTC) Posts: 1 
|
Hi, I can't get PdfPage.Render() to render a portion of page. I am trying to do it with matrix manipulation, but it's just not happening. In fact, whatever numbers or methods I try, the page is always rendered in full. Can someone explain how to correctly use FS_Matrix.Scale(), PdfPage.TransformWithClip() etc? Here's one of the attempts in code (tried many other versions with different values anywhere and everywhere, different methods, etc): Code: FS_RECTF rr = new FS_RECTF(0f, 0f, 1000f, 1000f);
FS_MATRIX mm = new FS_MATRIX(0.5f, 0, 0, 0.5f, 0, 0);
mm.Scale(.5f, .5f);
pdfPage.TransformWithClip(mm, rr);
pdfWidth = (int)pdfPage.Width;
pdfHeight = (int)pdfPage.Height;
pdfBmp = new PdfBitmap(pdfWidth, pdfHeight, false);
pdfBmp.FillRect(0, 0, pdfWidth, pdfHeight, FS_COLOR.White);
pdfPage.Render(pdfBmp, 0, 0, pdfWidth, pdfHeight, Patagames.Pdf.Enums.PageRotate.Normal, Patagames.Pdf.Enums.RenderFlags.FPDF_NONE);
|