Hello I am running some tests on Aspose PDF (.Net), I am working on a service that requires a good deal of control where things are placed in the page.
And I found that creating a rectangle (same size as boxes) in a page where the media box and the crop box are the same, ends up creating a rectangle in the wrong location. The following code:
Aspose.Pdf.Document doc = new Aspose.Pdf.Document();
Aspose.Pdf.Page page = doc.Pages.Add();
Aspose.Pdf.Drawing.Graph graph = new Graph(page.MediaBox.Width, page.MediaBox.Height);
Aspose.Pdf.Drawing.Rectangle r = new Aspose.Pdf.Drawing.Rectangle((float)page.MediaBox.LLX, (float)page.MediaBox.LLY, (float)page.MediaBox.Width, (float)page.MediaBox.Height);
r.GraphInfo.FillColor = Aspose.Pdf.Color.Azure;
graph.Shapes.Add(r);
page.Paragraphs.Add(graph);
doc.Save("test.pdf");
generates the following pdf. Notice the displacement of the rectangle. My expectation was: the rectangle should be covering the media and crop pages. Where is the displacement added? Can I change it?
Thanks!
test.pdf (1.5 KB)