lotus notes - Java Agent to import image resource -
i'm using java agent scale uploaded image , put local db image resources allow developers use resource in forms (my db image manager developers).
basically, works in webbrowser buit not in view or designer. when import image resource dxlimporter- class, designer tells me image size 0x0 pixels.
but isn't! when check out image withing images, can see preview. strange thing is: when export (agent)- imported image, delete image resource , import it, works.
the code import image resource:
//prepare dxl import dxlimporter dxlimport = session.createdxlimporter(); dxlimport.setaclimportoption(dxlimporter.dxlimportoption_update_else_create); dxlimport.setdesignimportoption(dxlimporter.dxlimportoption_replace_else_create); //init manager - sets dxl dxlmanager dxlmanager = new dxlmanager(buffer, strname, stralias, extension, session.getservername() + "!!" + db.getfilepath(), db.getreplicaid()); //actual import dxl dxlimport.importdxl(dxlmanager.builddxlfromtemplate(session), db);
builddxlfromtemplate creates dxl layout template , replaces needed fields (name, alias, jpeg, size, mimetype)
if compare agent imported resource manually important resource, difference missing signature field. manual sign doesn't though.
this modified dxl:
<?xml version='1.0'?> <!doctype imageresource system 'xmlschemas/domino_8_5_3.dtd'> <imageresource name='24-7-32.png' alias='static/24-7-32.png' xmlns='http://www.lotus.com/dxl' version='8.5' maintenanceversion='3.6' replicaid='[replicationid]' publicaccess='false' designerversion='8.5.3'> <jpeg >ivborw0kggoaaaansuheugaaacaaaaagcayaaabzenr0aaacruleqvr42u1xzusburd3a6wgqgd1erehd4oqsq+iry39d4te7bwgiigecxkegif1dygoblylicepab0eekjicwksqr42u/nazdf9dezc8ny0m83gxdiqqmbevpnnm9/mexkzgcpqhegwgjypvcrxrvarqot6m0ttnllwq93kcjlp3wjlkrsjoeq1wj2jxwjlzvbijokb7gg2uw2ilmvfxa2ukmqt3+8f4zoevulmda5d7ffvvymeaoakrgqph8mrvvponpobmf6wsuxz+tucgvpsb8avedw+afcjmtaqreocgxjddaweuumxgeh5i8qizarukn0r7oegavf0nu7h2fygsldkbuf6spsvrbirsqu+ivzqkdtbsl0ban9hw1zawheezsewg9wab4dnqxhoz50ajbkjzvtlaaucjrvxttab/uy2crl8sr8bch/rnoa/22nvrggitsvi0ue6er3+ql8dgcc4ud8tfk0aopdprjbuhebxcwsadxjkum0e+8nwl1ibxvbanwdvoky/rzl5lwbkednn6bhsags9nzchqb5zg2q+j35ef9kh7z+jeiovdykd8tlramg2m0m3hhhdoodftk3fkltqgshkmlnuaeayku3fumkwoq97dy629dgg6soj9xpis6bj97xtabjzxx05irdkgc+fw3ighnkdi5lmzv1rd7ycvd0dnwgcxfjmy5fraerkp9pzfbtoxfvbsgdit1/v9ekh4dufovac3r9+l8cf1bzranyhddrlpjv8sziup/ixl04ke/vvvrcaaaaasuvork5cyii=</jpeg> <item name='$filesize' sign='true'><number>638</number></item> <item name='$mimetype' sign='true'><text>image/png</text></item> <item name='$filemoddt' sign='true'><datetime dst='true'>20150401t100408,08+02</datetime></item></imageresource>
i'm using 9.0.1 pf2 client/designer 8.5.3 server (yes, that's horrible).
help appreciated :)
alright, after week of trying , losing hope, turns out proper .png import not possible client 9.0.1 or server 8.5.3.
importing jpeg, jpg , gif works charm. pngs however, have trouble.
the problem known , fix "on way".
Comments
Post a Comment