I read some where that in stm32 .bin file reflects exactly as it is in flash but when I compare my flash content(by using cube Programmer) & .bin file(which is generated by keil IDE), they were different from each other?
do any one know why they are different?
Flash contents
Bin file
The data is always the same.
This is a little-endian platform so when you display it as words the digits are in a different order to when you display it as bytes.
Related
There are two systems. I need to get the document in some format and print it in my application.
The source file should be in a pdf format.
Do you know the component for delphi7 that i could be able to open pdf file and print it on delphi's canvas. Is such approach good for the pdf document quality?
Or which format of the source document could be better to print in delphi application?
Thanks
I think almost all PDF preview components may do it.
When searching - https://www.google.ru/search?client=opera&q=delphi+render+pdf+to+canvas&sourceid=opera - you would instantly get at least few commercial libs:
http://www.gnostice.com/nl_article.asp?id=229&t=Convert_PDF_To_High-Resolution_Images_Using_Delphi
http://www.quickpdflibrary.com/faq/can-i-use-quick-pdf-as-a-viewer-in-my-delphi-application.php
http://www.wpcubed.com/manuals/wpviewpdf/idh_twpviewpdf_printhdc.htm
TCanvas is a wapper around Windows HDC. See http://docwiki.embarcadero.com/Libraries/en/Vcl.Graphics.TCanvas.Handle
I'm using Delphi.
I want to know how to extract (all) the icons from an exe file and insert them into another, preserving the order and the index of the icons.
I found some samples of Delphi code using Google but the problem is that it doesn't extract them all.
And I've found some compiled programs (exes) that do one or the other but not both.
Why do I need this: because I have to start some exe files (that have those icons) from virtualized applications. And I want to make some external exe files that have the same name and the same icons.
Thank you for your help.
The source is available for Colin Wilson's XN Resource Editor. It should have what you need.
http://www.wilsonc.demon.co.uk/d10resourceeditor.htm
Alternatively you have the Delphi sample 'ResXplor'. If it's not distributed in your version it's also avalaible to download here: http://radstudiodemos.svn.sourceforge.net/viewvc/radstudiodemos/branches/RadStudio_XE/Delphi/VCL/resXplor/
There was a similar question about extracting icons. PrivateExtractIcons gives you access to specific image sizes in an icon resource, but you need to know the sizes ahead of time, and Microsoft warns that this method is not for general use.
There is a working example of extracting the entire icon resource with all of the image sizes on Delphi Praxis. The example has a problem with 256 pixel images, so it would have to be tweaked to account for these.
Which of the mainstream Delphi report generators (if any) supports generating PDF files that comply with PDF/A standard? I'm mostly curious about FastReports and QuickReport.
We provided an open source report builder, to be used from code, which is able to produce PDF or even PDF/A compliant files.
You create your report from code, then you can preview it on the screen. You can then print or export the report as PDF. Note that the report drawing uses GDI+, even if you embed .emf files or TMetaFile in them: with antialiaising, they just look smooth on screen. There are some report-dedicated methods to create the report, but also a true Canvas property, in which you can draw whatever you want.
You can use the same class without the preview function, just to create a pdf file from some content.
It's free, licensed under MPL/LGPL/GPL, and compiles and run from Delphi 6 up to XE. It's 100% Unicode-ready, even before Delphi 2009.
In order to have your reports being compliant with the PDF/A standard, you must ensure that the ExportPDFA1 property is set to true. Only a sub-set of the font file (i.e. only used characters) will be joined to the pdf content, saving disk space. Therefore PDF/A files will be bigger than PDF files generated with the default options.
Reporting has just been enhanced (in our source code repository): now handle bookmarks, links, and document outline, and life-navigation within the report preview. The generated PDF file also handle those links and outline tree. Some issues were also fixed (about bitmaps or underlined text). And one bitmap will be stored only once in the PDF, if it's drawn several times on the report. So make sure you're using the latest source code repository version.
Have you considered using a PDF printer such as PDF Factory?
Generally the quickest way to get PDF's from reports.
All exes compiled can be decompiled (but with some hardship )
but delphi application forms are saved as dfms inside exe which can be seen easily (with reshacker) (soooo easily ) can i overcome these problems ,first i thought of copying dfm data to oncreate procedure so i can hide my form information .
tell me a good solution for this ,
i do not like to use compressors
and my application is bit large so i cant port resourese one by one to a dll. i need an effective solution.
.dfm files are not stored as txt when they're linked into the final PE file. They are converted to a tagged binary format that is placed into an RCDATA Windows resource. For the images, they are stored as the raw binary. While building your application, the .dfm files can be stored as text or binary (right click the form designer and there is a selection for choosing one or the other). This only affects the format of the .dfm file itself. It has zero affect on its format once it is linked into your final binary.
You can try to convert the images to constant arrays (there are many tools that will read a binary and write out an array decl in various language formats) and use it as an include file. Another thing is to encrypt the images using a one-way algorithm like RSA or PGP. This won't keep someone from decrypting the image, but it will keep someone from replacing it since they won't have the private key.
If this is about protecting your applications images you are already on the losing side:
https://stackoverflow.com/questions/455623/how-can-i-prevent-users-from-taking-screenshots-of-my-application-window
It is always possible to make screenshots of a running application.
I'm using the IdFTP (Indy 10) component to download some files (zip and txt) from a remote location. Before getting each file I set the TransferType to binary.
IdFTP.TransferType := ftBinary;
IdFTP.Get(ASource, ADest, AOverwrite);
I expect that both text and binary files can be downloaded using the binary mode. However it looks like text files contents is messed up while zip files are downloaded correctly. If I set the TransferType to ASCII for text files it works as expected. How can I detect which TransferType to set for a given file? Is there a common denominator or auto setting?
I don't see how the Binary flag can mess up transferred files. Binary type means the server transfers the files without any processing, as is.
The only thing that an FTP server should use the ASCII flag for, is to correctly handle the end of line in text files, usually (1) either only Line Feed in Unix or (2)Carriage Return + Line Feed in Windows. But nowadays most text editors handle both in either system.
So the safest is use only ASCII flag for very well known text files, probably only files with a .txt extension, and use Binary flag for all the others.
When in doubt, rule it out (!) - try transferring the files from the server using the Windows commandline FTP program, and see if text files still come out wrong. The program will transfer binary (command BIN) or text (command ASCII). If you transfer files with this and they still arrive differently to your expectation, then something is being done at the server end*. If they arrive fine, then either you (or Indy) are doing something. :-)
*In what way are the text files messed up? If you're transferring unicode text files, you might be better off transferring them as BINary anyway. I must admit that, as #unknown (yahoo) said, in most cases you should probably stick to BIN mode.
I guess it would also depend on how you are viewing the text file, ANSI or WideChar as to whether the text is messed up or not.