Created
October 20, 2016 12:23
-
-
Save Polaringu/10ccd1510cc65be18024ccd54f5072d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void addRotatedTextToolStripMenuItem_Click(object sender, EventArgs e) | |
{ | |
PDFXEdit.IPXC_Document doc = pxcInst.NewDocument(); | |
PDFXEdit.PXC_Rect rcMedia; | |
rcMedia.left = 0; | |
rcMedia.bottom = 0; | |
rcMedia.top = 800; | |
rcMedia.right = 600; | |
PDFXEdit.IPXC_UndoRedoData urData; | |
PDFXEdit.IPXC_Page page = doc.Pages.InsertPage(0, ref rcMedia, out urData); | |
PDFXEdit.PXC_Rect rcText; | |
rcText.left = 100; | |
rcText.bottom = 600; | |
rcText.top = 700; | |
rcText.right = 300; | |
PDFXEdit.IPXC_ContentCreator CC = doc.CreateContentCreator(); | |
PDFXEdit.PXC_Rect rcBlock; | |
CC.TranslateCS(100, 0); //Shifting 100 by X axis | |
CC.RotateCS(3.0); //3 degrees rotation | |
CC.ShowTextBlock("Test Text Block Text", rcText, rcText, 0, -1, null, null, null, out rcBlock); //draw text block | |
page.PlaceContent(CC.Detach(), (UInt32)PDFXEdit.PXC_PlaceContentFlags.PlaceContent_After); | |
pdfCtl.OpenDocFrom(doc); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment