Am new to MigraDoc. I have an image that has width of about 9000px on HTML. I want to draw that in PDF. Till now I just created a table, added column in it, then created one row for that table and then
TextFrame addressFrame = r2.Cells[0].AddTextFrame();
addressFrame.Width = "16cm";
addressFrame.Height = "22cm";
addressFrame.Orientation = TextOrientation.Downward;
// addressFrame.MarginLeft = "1cm";
MigraDoc.DocumentObjectModel.Shapes.Image image1 = addressFrame.AddImage(Utility.GetAbsolutePath(p_strPic1));
image1.Height = "25cm";
image1.Width = "40cm";
//image1.LockAspectRatio = true;
But it prints image in PDF only on one page, but I want that half pic on one page and then remaining on next page even if image is bigger than two pages, then it should expand to next page again.
It is up to you to add page breaks as needed. There is no automatic setting to split large images across several pages. And AFAIR TextFrames do not split across several pages either.
You can split the image before adding it to MigraDoc.
But you can also draw the large image on several pages with portions of the image outside the visible area of each page. If the image comes from a file then it should be included in the PDF only once, so there should be no file size problem using the same image on several pages.