This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
Todd Kneib  
#1 Posted : Thursday, March 18, 2021 1:57:02 PM(UTC)
Todd Kneib

Rank: Advanced Member

Groups: Guest
Joined: 5/10/2006(UTC)
Posts: 32

Thanks: 6 times
We are getting contents from a PDF frame, sometimes we need to rotate the GraphicsContainer before calling DrawContainer on our output AdvancedGraphics instance.

I tried using a pipeline against the PDFFrame, but the results of the pipeline is a raster bitmap, I need the contents to remain paths (which is what is in the PDF Frame)

Code:
.
.
.	
var pdfReader = new PdfReader(@"C:\temp\16x12_indoorPillow_CutFile.pdf", artwork.DpiX, artwork.DpiY);
var frameStuff = pdfReader.Frames[0];
Pipeline pip = new Pipeline();
pip.Add(frameStuff);
pip.Add(new Rotate(90));

// the result of the pipeline is a raster image
graphics.DrawImage(pip, 150, 150);
.
.
.
Todd Kneib  
#2 Posted : Monday, March 22, 2021 9:25:58 AM(UTC)
Todd Kneib

Rank: Advanced Member

Groups: Guest
Joined: 5/10/2006(UTC)
Posts: 32

Thanks: 6 times
Figured it out.

What you have to do is apply a transform to the graphics then draw the container, and then reset the transform before continuing

Code:
graphics.Transform.Translate(container.Height, 0);
graphics.Transform.RotateAt(90, new System.Drawing.PointF(artwork.Width + 200, 150));
graphics.DrawContainer(container, artwork.Width + 200, 150);
graphics.Transform.RotateAt(-90, new System.Drawing.PointF(artwork.Width + 200, 150));
graphics.Transform.Translate(-container.Height, 0);

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.