Forum Replies Created
-
AuthorPosts
-
in reply to: Fit image bu width or height February 20, 2015 at 09:48#29671
I am afraid percentage height values are not supported. In PDF generation context not always obvious what should be taken as a basis to calculate relative height.
For example:
<body> <img src="pic.png" height="100%"> </body>
In the case image height depends on HTML body height, but html body height depends on image height.
in reply to: How to embedd PDF? February 20, 2015 at 10:28#29668https://pd4ml.com/cookbook/pdf-attachments.htm
So I tried the inline option but pdf:attachment tag always asks for src attribute.. If I leave it empty:
<pd4ml:attachment description="attached.txt" src=""><br /> data:base64,YSxiLGMsZCxlDQp2YWx1ZSAxLCB2YWx1ZSAyLCB2YWx1ZSAzLCB2YWx1ZSA0<br /> </pd4ml:attachment>I see just an icon and not the attachment. Do I do something wrong?
in reply to: Trouble understanding differencies between Linux and Windows February 20, 2015 at 11:25#29624In the next version it will suppress the version-, JVM- and OS- specific info when a document ID is overridden with System.setProperty(“pd4ml.document.id”, “…..”) call.
Normally we publish monthly maintenance updates. The most recent release was few days ago. I expect a new version is to be available close to the middle of March.
in reply to: How to embedd PDF? February 20, 2015 at 11:40#29669Try
<pd4ml:attachment description="attached.txt" src="data:base64,YSxiLGMsZCxlDQp2YWx1ZSAxLCB2YWx1ZSAyLCB2YWx1ZSAzLCB2YWx1ZSA0"/>
in reply to: HTML/CSS rendering issues February 20, 2015 at 12:47#26994Just tried to add such thing – failed. As soon as you specify div inside header as position:absolute the content (which is img tag) goes over it and covers it.
Is there any way to implement such thing? I want to “put” a stamp over the image.
Thank you in advancein reply to: Trouble understanding differencies between Linux and Windows February 20, 2015 at 13:14#29625Thank a lot for all your answers.
All given solutions seems perfect !
Can’t wait to see your new release !
in reply to: Problems with bullets in list, RTF file February 20, 2015 at 14:01#29664Just tested it and indeed is solved, thanks!
in reply to: HTML/CSS rendering issues February 24, 2015 at 15:26#26995Hi there,
I try to convert this html code:<br /> <p><br /> Dear Jack,<br /> <br />this is line 1.this is line 1.this is line 1.this is line 1.<br /> </p><br /> <p><br /> this is line 2<br /> <br />this is line 3<br /> </p><br />Why there is so much space between p tag in VAND generated pdf?
Is there a way to reduce it?in reply to: Getting HEAP SPACE-OUT OF MEMORY when processing large files March 2, 2015 at 06:53#29244Hi Team,
Are you planning to use some stream or writer so it can handle big pdf. 17 MB html file should not be big. Ideally framework should allow 1 GB html file to pdf.
Thanks
Ramin reply to: P tag "interline" problem March 2, 2015 at 15:02#29673I resolved with {padding:0; margin:0} styles added to p and div tag.
in reply to: P tag "interline" problem March 2, 2015 at 18:06#29674Probably a removal of paragraph margins completely is not always a good idea. You could define/override styles only for particular cases, for example:
P + P, DIV + P { margin-top: 0 }
resets top margin, only if a paragraph follows other paragraph or DIV
in reply to: Getting HEAP SPACE-OUT OF MEMORY when processing large files March 2, 2015 at 18:48#29245I am afraid, a streamed or serialized HTML-to-PDF conversion is not possible – a document must be rendered in memory completely before it is converted to PDF. There is always a possibility that at the end of a document there is an HTML tag or a content portion, which would require a complete document re-layouting.
in reply to: Trouble understanding differencies between Linux and Windows March 9, 2015 at 16:03#29626Hi !
We’ve tried your new version 3.9.5, it doesn’t allow to overwrite pdf metadata.
Furthermore, when we look at the source code, we don’t see any change regarding our case.
Thus, could you give us some precision regarding which version will “permit the suppression of the version-, JVM- and OS- specific info when a document ID is overridden with System.setProperty(“pd4ml.document.id”, “…..”) call” and when it’ll be able.Best regards,
in reply to: General questions / FAQ March 12, 2015 at 09:57#26996PD4ML Support team,
Thank you for an excellent product.
I was able to use PD4ML to create PDF from HTML and was able to merge PDF documents created by PD4ML easily.On the other hand, I got a Java.lang.NullPointerException error when I tried to merge a general PDF file that was not created by PD4ML.
Do you have any suggestion or do you have a secure location I can send the PDF in question to you ?
Thanks !
Benjamin
benjamin_lau@yahoo.comHere is the log
Merging : 000001419-000001.pdf
Merging : 000001412-000001.pdf
Merging : 000001412-000002.pdf
Merging : 000001412-000003.pdf
Merging : 000001413-000002.pdf
Merging : 000001413-000001.pdf
Merging : Account-Servicing-Communications-ASC-012412.pdf
Merging : Address-Changes-011912.pdf
java.lang.NullPointerException
at org.zefer.pd4ml.npdf.c.o00000(Unknown Source)
at org.zefer.pd4ml.npdf.parser.g.super(Unknown Source)
at org.zefer.pd4ml.npdf.parser.g.super(Unknown Source)
at org.zefer.pd4ml.npdf.PD4DocumentBase.write(Unknown Source)
at org.zefer.pd4ml.npdf.PD4DocumentBase.write(Unknown Source)
at com.tfs.km.kmPrintEngine.KmPrintBinder.MergePdfDocuments(KmPrintBinder.java:201)
at com.tfs.km.kmPrintEngine.KmPrintBinder.retrieveBinderPages(KmPrintBinder.java:108)
at com.tfs.km.kmPrintEngine.KmPrintBinder.main(KmPrintBinder.java:38)
java.lang.NullPointerException
at org.zefer.pd4ml.npdf.parser.f.super(Unknown Source)
at org.zefer.pd4ml.npdf.parser.g.super(Unknown Source)
at org.zefer.pd4ml.PD4Document.o00000(Unknown Source)
at org.zefer.pd4ml.npdf.PD4DocumentBase.read(Unknown Source)
at org.zefer.pd4ml.npdf.PD4DocumentBase.Ó00000(Unknown Source)
at org.zefer.pd4ml.npdf.PD4DocumentBase.append(Unknown Source)
at com.tfs.km.kmPrintEngine.KmPrintBinder.MergePdfDocuments(KmPrintBinder.java:197)
at com.tfs.km.kmPrintEngine.KmPrintBinder.retrieveBinderPages(KmPrintBinder.java:108)
at com.tfs.km.kmPrintEngine.KmPrintBinder.main(KmPrintBinder.java:38)in reply to: General questions / FAQ March 14, 2015 at 07:27#26997I am getting null pointer exception.once see my code
Note:I am using Ubuntu os in my systempublic String convert(String patid,int pdfcnt,int needhead,String dischuser) throws FileNotFoundException, IOException, DocumentException, DaoException, Exception { Converter1 converter = new Converter1(); List ls=dao.executeQuery("select admin.getusernm(i.userid) usernm,u.unitnm,u.unitid from ip.ipinfo i,ip.unithdr u where u.unitid=i.unit and patid='"+patid+"'"); Map mp=null;String docnm="",docid="",docregno="";String fonts="",length=""; if(ls.size()>0){ mp=(Map)ls.get(0); usernm=mp.get("USERNM").toString(); docnm=mp.get("UNITNM").toString(); docid=mp.get("UNITID").toString(); } mp=null; List lst=dao.executeQuery("select nvl(drregno,0) drregno from admin.doctorinfo d,ip.unitmaster u where u.doctorid=d.docid and u.unitid='"+docid+"'"); if(lst.size()>0){ mp=(Map)lst.get(0); docregno="0"; } String path = dao.gettomcatserverPath1() + "webapps/wordimages/disch" +patid+ ".pdf"; List list1 = dao.executeQuery("select wordole from ip.dischargetemplate where patid='"+patid+"'"); String htmlFileName =((Map)list1.get(0)).get("WORDOLE").toString(); htmlFileName=htmlFileName.replace("$DOCNM",docnm).replace("$DOCREGNO", docregno); File pdfFile = new File(path); converter.runConverter(htmlFileName,pdfFile); return "1"; } private String runConverter(String urlstring, File output) throws IOException { if (urlstring.length() > 0) { if (!urlstring.startsWith("http://") && !urlstring.startsWith("file:")) { urlstring = "http://" + urlstring; } java.io.FileOutputStream fos = new java.io.FileOutputStream(output); if ( proxyHost != null && proxyHost.length() != 0 && proxyPort != 0 ) { System.getProperties().setProperty("proxySet", "true"); System.getProperties().setProperty("proxyHost", proxyHost); System.getProperties().setProperty("proxyPort", "" + proxyPort); } PD4ML pd4ml = new PD4ML(); try { pd4ml.setPageSize( landscapeValue ? pd4ml.changePageOrientation( format ): format ); } catch (Exception e) { e.printStackTrace(); } if ( unitsValue.equals("mm") ) { pd4ml.setPageInsetsMM( new Insets(topValue, leftValue, bottomValue, rightValue) ); } else { pd4ml.setPageInsets( new Insets(topValue, leftValue, bottomValue, rightValue) ); } pd4ml.setHtmlWidth( userSpaceWidth ); pd4ml.render( urlstring, fos ); } return "1"; } } -
AuthorPosts
