Forum Replies Created

Viewing 15 posts - 2,656 through 2,670 (of 4,234 total)
  • Author
    Posts
  • in reply to: Troubleshooting
    #26934

    I am using .tiff images for my PDF and they are not appearing when the letter is being generated.

    There are no errors in the logs. When I use .png images, they work.

    Any comments would be helpful.

    in reply to: Javascript is not getting executed with PD4ML
    #29546

    PD4ML does not support Javascript and we have no plans to support it. The topic with a tricky workaround is discussed by the link:
    html-css-to-pdf-rendering-issues-f3/is-javascript-supported-t216.html

    Alternatively you may give a try to PD4ML Web wrapper to a PhantomJS HTML->PDF converter module. http://pd4ml.com/pd4ml_web.htm Its functionality is planned to be included to PD4ML v4 as an option.

    in reply to: General questions / FAQ
    #26935

    Hello Sir,

    I my html , I am creating bubble symbols using bellow style.

    .bubble-1 {min-width:18px; border-radius:100%;} for tag

    But in pdf ‘border-radius:100%‘ is not applicable and tag is also not there in PD4ML styles

    Can you help me how to apply bubble(round symbols in pdf).

    Thanks,
    Sathish.H

    in reply to: need servlet code for converting html string to pdf
    #29038

    Hi,

    I have been using the below sample code in my application. I have been using the demo jar.

    PD4ML html = new PD4ML();<br /> html.setPageSize(new java.awt.Dimension(450, 450));<br /> html.setPageInsets(new java.awt.Insets(20, 50, 10, 10));<br /> html.setHtmlWidth(750);<br /> html.enableImgSplit(false);<br /> response.setHeader("Content-Disposition", "attachment; filename=test.pdf");<br /> <br /> URL base = new URL("file:D:/home.jsp");<br /> html.render(url, baos);<br />

    Is this feature available in PD4ML library or in PD4Ml library PRO? I have to give this info to my procurement team.

    in reply to: General questions / FAQ
    #26936

    Hi,

    I have been using the below sample code in my application. I have been using the demo jar.

    PD4ML html = new PD4ML();<br /> html.setPageSize(new java.awt.Dimension(450, 450));<br /> html.setPageInsets(new java.awt.Insets(20, 50, 10, 10));<br /> html.setHtmlWidth(750);<br /> html.enableImgSplit(false);<br /> response.setHeader("Content-Disposition", "attachment; filename=test.pdf");<br /> <br /> URL base = new URL("file:D:/home.jsp");<br /> html.render(url, baos);

    Is this feature available in PD4ML library or in PD4Ml library PRO? I have to give this info to my procurement team.

    in reply to: need servlet code for converting html string to pdf
    #29039

    The code works with both Std and Pro versions.

    The Pro version would also allow you to embed TTF fonts and to display with them non-Latin and special characters.

    in reply to: Is demo jar PD4ML library or in PD4Ml library PRO?
    #29548

    The code works with both Std and Pro versions.

    The Pro version would also allow you to embed TTF fonts and to display with them non-Latin and special characters.

    in reply to: TTF embedding
    #27317

    By default PD4ML converts to PDF characters, belong to Latin-1 charset only using built-in Adobe fonts (Helvetica, Times New Roman and Courier New). In order to output national or special characters you would need to configure and utilize TTF embedding feature. See:

    http://pd4ml.com/reference.htm#7.1
    pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html
    http://pd4ml.com/cookbook/pd4ml_pdf_true_type_fonts.htm

    in reply to: Is <em> tag supported?
    #29424

    tag is supported – it is just a synonym to in a PDF conversion context.

    in reply to: General questions / FAQ
    #26937

    Hi, I am pd4ml rookie here. So, please forgive me if I am asking a primeval question.
    I am trying to integrate pd4ml with phantomjs to generate a pdf from html that contains javascript. So far, I was unable to generate for a simple html using the web module. I searched for examples but could not find anything to my satisfaction. I am posting my actual code here.
    This is my java code(taken from the toc example provided in the downloads). The only change I made(as mentioned in http://pd4ml.com/pd4ml_web.htm) was to use the web.pd4ml package. I am using the same sample.html file that comes with the example.
    <br /> package main;<br /> <br /> import java.awt.Dimension;<br /> import java.awt.Insets;<br /> import java.io.File;<br /> import java.io.FileInputStream;<br /> import java.io.InputStream;<br /> import java.io.InputStreamReader;<br /> <br /> import org.zefer.pd4ml.PD4Constants;<br /> import org.zefer.pd4ml.PD4PageMark;<br /> import org.zefer.pd4ml.web.PD4ML;<br /> <br /> public class WebPageConverterWithPhantomJS {<br /> <br /> public static void main(String[] args) throws Exception {<br /> WebPageConverterWithPhantomJS converter = new WebPageConverterWithPhantomJS();<br /> String htmlFileName = "C:\DEV\workspace\PD4MLExample\examples\toc\sample.html";<br /> File pdfFile = new File("C:\DEV\workspace\PD4MLExample\examples\toc\sampleUsingPhantomJS.pdf");<br /> converter.generatePDF(htmlFileName, pdfFile, PD4Constants.A4,<br /> args.length > 2 ? args[2] : null, args.length > 3 ? args[3] : null );<br /> System.out.println("done.");<br /> }<br /> <br /> private void generatePDF(String inputHTMLFileName, File outputPDFFile, Dimension format, String fontsDir, String headerBody)<br /> throws Exception {<br /> <br /> java.io.FileOutputStream fos = new java.io.FileOutputStream(outputPDFFile);<br /> PD4ML pd4ml = new PD4ML("C:\DEV\workspace\PD4MLExample\public\tools\phantomjs.exe");<br /> pd4ml.setPageInsets(new Insets(20, 10, 10, 10));<br /> pd4ml.setHtmlWidth(950);<br /> pd4ml.setPageSize(pd4ml.changePageOrientation(format)); // landscape page orientation<br /> if ( fontsDir != null && fontsDir.length() > 0 ) {<br /> pd4ml.useTTF( fontsDir, true );<br /> }<br /> if ( headerBody != null && headerBody.length() > 0 ) {<br /> PD4PageMark header = new PD4PageMark();<br /> header.setAreaHeight( -1 ); // autocompute<br /> header.setHtmlTemplate( headerBody ); // autocompute<br /> pd4ml.setPageHeader( header );<br /> }<br /> pd4ml.enableDebugInfo();<br /> <br /> InputStream is = new FileInputStream(inputHTMLFileName);<br /> InputStreamReader isr = new InputStreamReader(is, "UTF-8");<br /> <br /> pd4ml.render(isr, fos);<br /> //pd4ml.render("file:" + inputHTMLFileName, fos);<br /> }<br /> }<br /> <br />

    This is the change I made in the html . Included bootstrap css, font-awesome css, jquery and bootstrap js files.
    <br /> <META http-equiv=Content-Type content="text/html; charset=UTF-8"><br /> ..<br /> <LINK href="i/W3C-REC.css" type=text/css rel=stylesheet><br /> <LINK href="i/default.css" type=text/css rel=STYLESHEET><br /> <link rel="stylesheet" type="text/css" href="public/stylesheets/bootstrap-2.3.css"/><br /> <link rel="stylesheet" type="text/css" href="public/stylesheets/font-awesome.css" /><br /> .<br /> .<br /> <script type="text/javascript" src="public/javascripts/jquery-1.7.2.min.js"></script><br /> <script type="text/javascript" src="public/javascripts/bootstrap-2.1.min.js"></script><br /> .<br /> .<br /> </HEAD><br /> <BODY><br /> <br /> <script type="text/javascript"><br /> $(document).ready(function(){<br /> $(".thisred").addClass("red"); //testing only.<br /> });<br /> </script><br />

    When I execute this code, it throws the error
    <br /> 090b2 Pro (eval)<br /> ReferenceError: Can't find variable: $<br /> <br /> c:%5CUsers%5CUKALIVI%5CAppData%5CLocal%5CTemp%5Cpd4ml1002373815533658363.htm:29<br /> Exception in thread "main" java.lang.NoSuchMethodError: org.zefer.pd4ml.pdf.parser.h.o00000(Ljava/io/InputStream;)[B<br /> at org.zefer.pd4ml.web.PD4ML.Ò00000(Unknown Source)<br /> at org.zefer.pd4ml.web.PD4ML.render(Unknown Source)<br /> at main.WebPageConverterWithPhantomJS.generatePDF(WebPageConverterWithPhantomJS.java:50)<br /> at main.WebPageConverterWithPhantomJS.main(WebPageConverterWithPhantomJS.java:23)<br /> <br />

    If I change the instantiation of pd4ml to :
    <br /> PD4ML pd4ml = new PD4ML("C:\DEV\workspace\PD4MLExample\public\tools\phantomjs.exe");<br />

    I don’t get the error and the console shows done. But the pdf generated is not useful, the pd4ml tags were not recognized I think.

    <br /> 090b2 Pro (eval)<br /> ReferenceError: Can't find variable: $<br /> <br /> c:%5CUsers%5CUKALIVI%5CAppData%5CLocal%5CTemp%5Cpd4ml2710392443226086703.htm:29<br /> done.<br /> <br />

    Could you please let me know what I am missing here. Also, could you please provide some examples for integration with phantomjs.

    in reply to: .TIFF images not appearing in PDF
    #29547

    By default PD4ML supports only Fax-specific TIFF image sub-formats. Obviously in your case the TIFF format is not among the supported.

    A workaround would be to define a so-called custom resource loader and let it re-format a TIFFs to anything compatible.

    See:
    http://pd4ml.com/cookbook/custom_rc_loaders.htm
    and an attachment.

    in reply to: "Print Ready" PDFs?
    #29544

    Right now there is no way to generate PDFs with CMYK colorspace.

    You could request the feature implementation on an (affordable) paid basis.

    #29504

    Just released v390 addresses the issue. Do not forget to copy an updated ss_css2.jar from the distribution package to your application resources.

    in reply to: css @media parsing
    #28345

    Just-released v390 addresses the issue.

    Please give it a try.

    in reply to: Custom Fonts
    #27412

    on Win8.1 in cmd:
    I:xampphtdocspd4mlprobe>java -Xmx512m -Djava.awt.headless=true -cp I:xampphtdocspd4mlpd4ml_demo.jar Pd4Cmd "file:123.html" -ttf I:xampphtdocspd4mlfonts 800 A4 -debug -out pd4ml.pdf<br /> version: PD4ML 385fx6 Pro (eval)<br /> not yet in cache: file:I:xampphtdocspd4mlfonts/pd4fonts.properties<br /> 'times' is not in pd4fonts.properties file<br /> reject TTF lookup for: 'times'<br /> not yet in cache: file:I:xampphtdocspd4mlfonts/times.ttf<br /> read 'times new roman' from file:I:xampphtdocspd4mlfonts/times.ttf<br /> 'times bold' is not in pd4fonts.properties file<br /> reject TTF lookup for: 'times bold'<br /> not yet in cache: file:I:xampphtdocspd4mlfonts/timesbd.ttf<br /> read 'times new roman bold' from file:I:xampphtdocspd4mlfonts/timesbd.ttf<br /> ...

    I:xampphtdocspd4mlfonts/pd4fonts.properties
    or
    I:xampphtdocspd4mlfonts/times.ttf
    is the right path in windows system?

Viewing 15 posts - 2,656 through 2,670 (of 4,234 total)