VintaSoft PDF .NET Plug-in Discussions
Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.
Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions
PdfRubberStampAnnotation pdfAnnotation = new PdfRubberStampAnnotation(page);
pdfAnnotation.Rectangle = new RectangleF(0, annotationMargin, lineHeight + annotationMargin, page.MediaBox.Height - annotationMargin * 2);
...
using (PdfGraphics graphics = pdfAnnotation.CreateNormalAppearanceGraphics())
{
brush.Color = markColor;
Font font = new Font(FontFamily.GenericSansSerif, fontSize);
StringFormat strFormat = new StringFormat();
strFormat.FormatFlags = StringFormatFlags.DirectionVertical;
strFormat.Alignment = StringAlignment.Center;
graphics.DrawString(classificationText, font, brush, pdfAnnotation.Rectangle, strFormat);
}
page.Annotations = new PdfAnnotationList(_document);
page.Annotations.Add(pdfAnnotation);
...graphics.SaveGraphicsState();
using(Matrix m = new Matrix())
{
m.Rotate(...) or m.RotateAt(...)
graphics.MultiplyTransform(m);
}
graphics.DrawString(...);
graphics.RestoreGraphicsState();using (PdfDocument document = new PdfDocument(filename))
{
// create font of PDF document based on TrueType font
PdfFont newFont1 = document.FontManager.CreateSimpleFontFromTrueTypeFont("C:\\Temp\\arial.ttf");
PdfFont newFont2 = document.FontManager.CreateCIDFontFromTrueTypeFont("C:\\Temp\\arial.ttf");
string myfont = PdfFontManager.GetSystemTrueTypeFontFileName("Times New Roman"); // This line does not geneerate an error and return correct path to the font file!
PdfFont newFont3 = document.FontManager.CreateSimpleFontFromTrueTypeFont(PdfFontManager.GetSystemTrueTypeFontFileName("Times New Roman"));
PdfFont newFont4 = document.FontManager.CreateCIDFontFromTrueTypeFont(PdfFontManager.GetSystemTrueTypeFontFileName("Times New Roman"));
}
2. Unable to create a vertical annotation using PDFFont object, because of Drawstring method of the Graphics class (one of the signatures) which contain PDFFont type attribute does not have attribute of type StringFormat (which actually write vertical string)p.s. Maybe I should send you my example PDF?Yes, please send us (to support@vintasoft.com) a working project which demonstrates your problems and we will try to help you.