November is pulmonary hypertension awareness month

Pulmonary Hypertension (PH) is high blood pressure in the arteries of the lungs that can lead to heart failure. It is still incurable and there is still a lot of research to do to understand, what causes the disease and hopefully find a way to cure it.

My wife has been diagnosed with PH almost 2 years ago. Thanks to very motivated and engaged doctors she is in a stable state at the moment.

PH is an orphan disease and so it is not much known in public. And even a well educated doctor will not always diagnose PH when a patients tells him that he is gasping for air when just trying to reach the next floor. Everybody can be affected and if PH is not diagnosed in an early state, chances are that you will die within the next 2 or 3 years.

PH needs awareness! November is pulmonary hypertension awareness month.

Please link to this article, tweet or share it on Facebook, Google+ etc.

Here are links to PH related sites that can give you some more information on PH


XPages to PDF with iText

Yesterday, David Leedy published a new extended edition of his great Notes in 9 video series. Brian Moore talked about how to create PDF from XPages and showed a simple example during the show.

I played a bit with the iText package and like to share some mor code that shows how to add tables and cells, anchors, chunks and phrases and even HTML to a PDF. Although this is very basic code, it should give you an idea, how to create other elements in PDF.

Here is the code. (Put it into a button on your XPage)

importPackage(com.itextpdf);
importPackage(java.io);

 

//Initialization
var con = facesContext.getExternalContext();
var response:com.ibm.xsp.webapp.XspHttpServletResponse = con.getResponse();

 

//setting response headers for browser to recognize data
response.setContentType(“application/pdf”);
response.setHeader(“Cache-Control”, “no-cache”);

response.setDateHeader(“Expires”, -1);
response.setHeader( “Content-Disposition”, “attachment; filename=\”test.pdf\”” );

 

// Setup the PDF Output Stream
var newPDF:com.itextpdf.text.Document = new com.itextpdf.text.Document();
var writer = com.itextpdf.text.pdf.PdfWriter.getInstance(newPDF,response.getOutputStream());
var htmlWorker = new com.itextpdf.text.html.simpleparser.HTMLWorker(newPDF);

 

// Open the PDF and write the PDF header info
newPDF.open();
newPDF.addAuthor(“Ulrich Krause”);
newPDF.addCreationDate();
newPDF.addCreator(“IBM Lotus Domino V8.5.3 :iText Library”);
newPDF.addTitle(“PDF Demo”);

 

//add a Hello World text to the PDF
var helloWorld = new com.itextpdf.text.Paragraph(“Hello world1”)
newPDF.add(helloWorld);

 

//Create a table with 3 cells, width = 100%
var table = new com.itextpdf.text.pdf.PdfPTable(3); // 3 columns.
var cell1 = new com.itextpdf.text.pdf.PdfPCell(new com.itextpdf.text.Paragraph(“Table Cell 1”));
var cell2 = new com.itextpdf.text.pdf.PdfPCell(new com.itextpdf.text.Paragraph(“Table Cell 2”));
var cell3 = new com.itextpdf.text.pdf.PdfPCell(new com.itextpdf.text.Paragraph(“Table Cell 3”));

table.setWidthPercentage(100);
table.addCell(cell1);
table.addCell(cell2);
table.addCell(cell3);
newPDF.add(table);

 

// Add a Chunk to the PDF; chunks do not add a CRLF when the leght exceeds page width. Better use phrases
newPDF.add(new com.itextpdf.text.Chunk(“This is a chunk. “));

 

// Add a Phrase to the PDF
newPDF.add(new com.itextpdf.text.Phrase(“This is a phrase. “));

 

// Add a ordered List to the PDF
var orderedList = new com.itextpdf.text.List(com.itextpdf.text.List.ORDERED);
orderedList.add(new com.itextpdf.text.ListItem(“Item 1”));
orderedList.add(new com.itextpdf.text.ListItem(“Item 2”));
orderedList.add(new com.itextpdf.text.ListItem(“Item 3”));
newPDF.add(orderedList)

 

// Add a link to the PDF
var anchor = new com.itextpdf.text.Anchor(“eknori.de”);
anchor.setReference(“https://www.eknori.de”);
newPDF.add(anchor);

 

// Add HTML to the PDF
var str = “<html><head><title>titlu</title></head><body><table><tr><td><br /><br /><a href=’https://www.eknori.de’>Link 2 eknori.de</a><br /><br /><br />Test</td></tr></table></body></html>”;
htmlWorker.parse(new java.io.StringReader(str));

 

// Finish
newPDF.close();
writer.close();

facesContext.responseComplete();

Have fun !


Examining LotusScript call stack after a crash or hang with NSD

There is a new feature in Notes/Domino 8.5.3 that tracks LotusScript call stacks as they execute on the client or server, and allows NSD to dump the recorded stacks.

1. Place the following entry in your notes.ini:

DEBUG_LS_DUMP=1

2. Restart the Lotus Domino server or Notes client.

When enabled, an NSD dump will include a LotusScript Interpreter section like the following, which shows a stack trace for all LotusScript that was running at the time NSD was called, for all threads in all Notes/Domino processes.

Read more …