Is there a way to control the formatting of TEXT files and how they appear? When to use newlines, etc? It converts the file, but the text looks strange. I also attached a sample text file and resulting PDF.
I know that in the full demo if i goto: File->New Document->From Text File..
There are some options under the "New Paragraph Mode" setting which can change the format. Is there a way to set that somehow via code? And if I do so would I have to change the way I load/convert a text document?
My Code:
Code: Select all
coreInstance = new PXV_Inst();
coreInstance.Init(null, DolphinCorePDF.devKey);
IPXV_MainFrame mainFrame;
uint parent = 0;
tagRECT ARect = new tagRECT();
coreInstance.CreateNewMainFrm(parent, ref ARect, 0, out mainFrame);
ICab AParams;
ICabNode AOpts;
string tempFileName = "SOMETEXTFILE";
AParams = coreInstance.CreateOpenDocParams();
AOpts = AParams.Root;
AOpts.SetBool("NoProgress", true);
Logger.Log("Attempting to Create PDF from file: " + fileName, 5);
IPXV_Document doc = coreInstance.MainFrm[0].OpenDocFromPath(fileName, AParams);
IString iString = coreInstance.CreateString(tempFileName);
Logger.Log("Attempting to save created PDF to: " + iString.Value, 5);
doc.Save(iString);
doc.Close();
doc = null;