|
@@ -9,19 +9,12 @@ using ComPDFKit.PDFPage.Edit;
|
|
using ComPDFKit.Tool.SettingParam;
|
|
using ComPDFKit.Tool.SettingParam;
|
|
using ComPDFKit.Tool.UndoManger;
|
|
using ComPDFKit.Tool.UndoManger;
|
|
using ComPDFKit.Viewer.Helper;
|
|
using ComPDFKit.Viewer.Helper;
|
|
-using ComPDFKitViewer.Annot;
|
|
|
|
-using ComPDFKitViewer.BaseObject;
|
|
|
|
-using System;
|
|
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
-using System.Text;
|
|
|
|
-using System.Threading.Tasks;
|
|
|
|
using System.Windows;
|
|
using System.Windows;
|
|
-using System.Windows.Documents;
|
|
|
|
using System.Windows.Media;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Media.Imaging;
|
|
-using System.Xml.Linq;
|
|
|
|
using static ComPDFKit.PDFAnnotation.CTextAttribute;
|
|
using static ComPDFKit.PDFAnnotation.CTextAttribute;
|
|
using static ComPDFKit.PDFAnnotation.CTextAttribute.CFontNameHelper;
|
|
using static ComPDFKit.PDFAnnotation.CTextAttribute.CFontNameHelper;
|
|
|
|
|
|
@@ -347,18 +340,20 @@ namespace ComPDFKit.Tool.Help
|
|
internal static TextEditParam GetTextEditParam(CPDFDocument cPDFDocument, CPDFEditTextArea cPDFEditArea, int PageIndex)
|
|
internal static TextEditParam GetTextEditParam(CPDFDocument cPDFDocument, CPDFEditTextArea cPDFEditArea, int PageIndex)
|
|
{
|
|
{
|
|
TextEditParam textEditParam = new TextEditParam();
|
|
TextEditParam textEditParam = new TextEditParam();
|
|
- float fontSize = 0;
|
|
|
|
- byte[] fontColor = null;
|
|
|
|
- byte transparency = 0;
|
|
|
|
|
|
+ string fontName = "Helvetica";
|
|
|
|
+ float fontSize = 14;
|
|
|
|
+ byte[] fontColor = {0,0,0};
|
|
|
|
+ byte transparency = 255;
|
|
bool isBold = false;
|
|
bool isBold = false;
|
|
bool isItalic = false;
|
|
bool isItalic = false;
|
|
- cPDFEditArea.GetTextStyle(ref fontSize, ref fontColor, ref transparency, ref isBold, ref isItalic);
|
|
|
|
- textEditParam.Transparency = transparency;
|
|
|
|
|
|
+
|
|
|
|
+ cPDFEditArea.GetTextStyle(ref fontName, ref fontSize, ref fontColor, ref transparency, ref isBold, ref isItalic);
|
|
|
|
+ textEditParam.FontName = fontName;
|
|
textEditParam.FontSize = fontSize;
|
|
textEditParam.FontSize = fontSize;
|
|
textEditParam.FontColor = fontColor;
|
|
textEditParam.FontColor = fontColor;
|
|
|
|
+ textEditParam.Transparency = transparency;
|
|
textEditParam.TextAlign = cPDFEditArea.GetTextSectionAlign();
|
|
textEditParam.TextAlign = cPDFEditArea.GetTextSectionAlign();
|
|
textEditParam.EditType = CPDFEditType.EditText;
|
|
textEditParam.EditType = CPDFEditType.EditText;
|
|
- textEditParam.FontName = cPDFEditArea.GetCharsFontName();
|
|
|
|
CPDFPage docPage = cPDFDocument.PageAtIndex(PageIndex);
|
|
CPDFPage docPage = cPDFDocument.PageAtIndex(PageIndex);
|
|
CPDFEditPage EditPage = docPage.GetEditPage();
|
|
CPDFEditPage EditPage = docPage.GetEditPage();
|
|
textEditParam.EditIndex = EditPage.GetEditAreaList().IndexOf(cPDFEditArea);
|
|
textEditParam.EditIndex = EditPage.GetEditAreaList().IndexOf(cPDFEditArea);
|