Archive for category Making

Messing with PHP-ODT

I’m working oh hobby project on a free time, and one of the tasks here is to generate ODT file, containing output from the database. The output library i’ve chosen is PHP-ODT. It’s kind of basic, but allows to create ODT documents on the fly.

And now, lessons learned

Allways provide file size.

This code will create corrupt file, according to LibreOffice: The correct code is:

 header(“Content-Description: File Transfer”);
header(“Content-Type: application/vnd.oasis.opendocument.text”);
header(“Content-Disposition: attachment; filename=\”” . $ODTFile .”\”” );
readfile($ODTtmpFile);

 header(“Content-Description: File Transfer”);
header(“Content-Type: application/vnd.oasis.opendocument.text”);
header(‘Content-Length: ‘ . filesize($ODTtmpFile));
header(“Content-Disposition: attachment; filename=\”” . $ODTFile .”\”” );
readfile($ODTtmpFile);

It is possible to add hierarchical styles

Not in the base code yet

$pStyleDate = new ParagraphStyle(‘revDate’);

$pStyleDateStrike = new ParagraphStyle(‘revDate-strike’);
$pStyleDateStrike->setAsChild(‘revDate’);

It is possible to add text decorations in the paragraph level

Again, not in the base code yet:

$pStyleDateStrike->setLineThrough(StyleConstants::SINGLE);

It is possible to merge cells in the table

Well, not in the base code and horizontally only:

$hSpan=array(“”,””,””);

$cRow = array($hSpan,$pRev,$pDate,$pMemo);
$table->addRows(array($cRow));

Tags: ,

PCB manufacturing in China

So, here it comes. I need a small, pretty looking PCB for the infrared switcher.

It took 3 hours to validate the order, almost 25 hours to make the PCBs and almost 2 days to announce them delivery ready.

To be continued, once they arrive 🙂

Tags:

Infrared switcher for the auditorium. Part 1

Sometimes I find myself in awkward situations.

Some time ago we have installed a video duplication system in one of auditoriums. It is based on the HDMI backbone and some active equipment, like splitters and media converters.

It has single video injection point, where different sources can be selected. Source switching is made using KD-S4X1 switch from Key Digital.

One small problem is the entire installation must be concealed, while the switch is controlled with a button on the case and the IR remote. It has also no means of displaying the output, except a LED per active channel.

And so the Project was born: place a push button anywhere and replay the sequence on the IR LED inside the enclosure. Just to be sure, an Read the rest of this entry »

Tags: , ,

Grinding arbor for Unimat SL/DB

Unimat SL/DB grinding arbor. Photo from the Internet

Arbor’s lenght 18 + grinding tool + 3 + 5.2 (bolt head) mm. Thread length on bolt 13,2 mm, M12x1.

Thread on the arbor M12x1, continuous, last 5 mm toward the headstock are bored to ~14 mm.

Holder diameter 15 mm, holder lip 3 mm. Max diameter 28mm.

 

The things: short story

A bending jig, a piece of stainless steel
20160428_234945 Read the rest of this entry »