Display XML on bitmap
$30-250 USD
Pagado a la entrega
I'm developing WinMobile application with printing suppot.
One of subtasks is customizable reports. Printer API is very specific.
It can print text, but only 4 font sizes; left, right, centered, no word wrap.
Also it can print bitmaps.
So idea is to draw report on bitmap and then print it by API.
From you, I need XML based report template language. (I think better to use HTML subset. May be <DIV> <IMG> <TABLE> will be enough.)
And I need module that draw this template on bitmap.
From report templates I need:
1. Blocks of text (<DIV>?) with
- bounding rect (opt)
- background color (opt)
- background image (opt)
- fonts (color, size, weight, underline and so on)
- word wrap
- text alignment (left, right, center, justify)
- absolute positioning
- relative positioning
2. Images. <IMG>
- no stretch or scale
- crop;
- width/height required
- centered or aligned
3. Tables:
- width
- height
- row/col spans
- borders
That's all for now.
---------------
3rd party opensource libraries acceptable.
You can use GDI or GDI+
You can use C++, C# or VB.NET
---------------
If you know (or plan to use) 3rd party opensource project that can help, point this in your bid.
---------------
Ask if you have any question.
I made some investigations, so I need class with interface:
class CXMLPrinter {
public:
CXMLPrinter();
//Layout xml for specified width and return calculated height
int Layout(String xml, int width);
BOOL Draw(RECT bounds, String fileName) {
Bitmap bmp(bounds.width, bounds.height, Format32bitRGB);
if (!PrepareBitmap(bounds, bmp))
return false;
if (!CreateBMP((bounds.width, bounds.height, bmp.scanline0, fileName))
return false;
return true;
}
protected:
BOOL PrepareBitmap(RECT bounds, Bitmap bmp);
}
I'll provide DLL with conversion routine:
VB.NET signature:
<DllImport("BMPCreator.dll")> _
Public Shared Function CreateBMP( _
ByVal iWidth As Integer, _
ByVal iHeight As Integer, _
ByVal pScanLine0Ptr As IntPtr, _
ByVal sFile As String) As Integer
End Function
C++ signature:
BMPCREATOR_API int CreateBMP(int width, int height, BYTE *pScanLine0Ptr, WCHAR *fName);
Nº del proyecto: #429368
Sobre el proyecto
4 freelancers están ofertando un promedio de $200 por este trabajo
Experience of programming on various versions of C 20+ years. Wide experience of work with images.
Hello Sir! I can do this project for U. I have some interesting ideas for your problem. Im happy to discuss with you more about this. Regard Anh