I want to write simple text pdf file and I use Synopse pdf Delphi library.
Is it possible to write one text line to file and it automatically insert new line to file without using coordinates?
The easiest is to use the mORMotReport.pas unit.
It is very easy to add some text, with automatic insert of lines, and page layout.
See this sample folder as reference.
Related
I'm making a small program which is added to a PDF and created an image and some text. The problem is that using the function AddTrueTypeFont gives me errors either Invalid Variant Error or You can not use this statement in an automatic object.
I am using the Debenu Quick PDF Library, Lite version 1114 (DebenuPDFLibraryLite1114.dll).
In summary, I would like to know how I can put a text with font Verdana in the source.
I am looking to create a text file on my iPhone programmatically and also write some data onto the file. How can I read the text file manually?
Use NSString's initWithContentsOfFile:encoding:error: to read the file, then use stringByAppendingFormat: to add some data, and then use writeToFile:atomically:encoding:error: to write it on disk.
I have an old app (Delphi 5) which I want to give it some changes via Res Editor !
I want to set a background image for a Form via RCData in Res Editor, How can I do that?
Any help is really appreciated.
Thanks :)
Delphi forms don't have a simple background-image property.
You could edit the DFM resource for the form to insert a TImage control. Extract the DFM resource, open it in Delphi, add the control you want, save it, and then replace the original resource with your new version.
See also:
Setting up background images for forms in Delphi
How to add background images to Delphi forms
Angus Johnson has written a utility called ResHacker. Use it to directly edit the form properties in the exe file.
This is the link to his site
Majid Pasha, procedure is really simple and straight-forward:
Extract form resource (type is RCDATA, name matches form in question, language is not important)
Convert form from binary format to text using convert utility (shipped with delphi)
Use your Delphi to design boilerplate image, load picture, set placement, etc
View designed form as text, copy you new image definition along with all its data
Paste image into text version of extracted form resource
convert back to binary format
Add resource back to executable replacing original one.
Note: depending on tools uses, there might be some shortcuts to bypass conversions and extraction, eg: XN Resource Editor is able to edit Text DFM directly.
I'd like to add a code appendix to my LyX document. There are a few options I already considered, but they all have their problems.
I know a bit about listings, but one problem with those is that, if I copy & paste my code into them, I lose all enters/newlines. Since the code is too large to correct by hand, I was wondering if there is an alternative.
In LyX there is the possibility of inserting child documents, but that seems to be only for .tex files. Would have been ideal if I could just insert my .java file as a child document.
I could print the code to PDF, but it will include margins that mess up the final document, since the PDF is placed on the left margin of the final document and then there is the margin of the PDF. Also, this PDF always contains the entire code and white areas where not the entire page has been filled.
Does anyone have good alternative?
The listings package found here
http://www.ctan.org/tex-archive/macros/latex/contrib/listings/
allows the include of external source code files (look into the reference for \lstinputlisting).
EDIT: here you find some samples how to use it:
http://en.wikibooks.org/wiki/LaTeX/Packages/Listings
If you need to copy-paste code to LyX listing box then use Edit -> Paste Special -> Seletion or Ctrl+Alt+V.
For what it's worth, at least the 2.0 versions of LyX have the ability to include listings as child documents. Insert, File, Child Document, and choose from the dropdown box "Program Listing". This uses the listings package and lets you keep your source in its own file.
If listings doesn't support your language, you can always use something like highlight or source-highlight to generate a latex snippet of syntax-highlighted code that you can add as a child document of type "Input"
Yes, if you copy&paste code into the LyX listings box, you lose all newlines, but you can preprocess your code (insert an extra newline below each line):
$ cat foo.java | sed -e 's/$/\n/' > bar.java
Then you can copy&paste the new file bar.java and everything will be ok.
I am having .rtf extension file that's contents in tabular format, Now I want to import this .rtf file in TRichEdit control (only contents in formatted order not table grid-line), means want to hide gridlines after importing.
pls tell me solution for Delphi7
Thnks Shashi Jaiswal
You may want to post on StackOverflow instead.
Also, I think you want to "import to TRichEdit", not "export".
And finally, if you load the file in a TMemoryStream, you could do something like RichEdit1.Lines.LoadFromStream(theStream) (where "RichEdit1" is the name of the TRichEdit and theStream is the TMemoryStream) but I haven't tested it, delphi 7 fails to work on my new computer :(