Forum Replies Created

Viewing 15 posts - 1,306 through 1,320 (of 4,243 total)
  • Author
    Posts
  • in reply to: Multicolumn with PHP
    #28554

    Hi,

    Do you know when the new beta will be available? We cannot continue with this PDF project unless multicolumn is supported.

    TIA… Nico

    in reply to: Deployment / Configuration issues
    #26569

    EDIT:
    I got it working; my mistake was that I didn’t place the PD4Converter.aspx.cs in the App_Code folder.

    Hi

    I’m trying the .net trial version and I cannot get the sample web app to work

    I’m getting the error
    “The type or namespace name ‘PD4Converter’ could not be found (are you missing a using directive or an assembly reference?)”

    means that I don’t reference the dlls somehow (I added the references browsing to the dlls).

    EDIT: framework 4.0

    I’m attaching a gif with the structure of my project

    in reply to: rendering <a> tags so they are still clickable in pdf
    #28551

    Thank you for the prompt response. I discovered that the problem was not with pd4ml, but with the iText code I was using to merge multiple pdf files together with. Pd4ml is creating the hyperlinks in pdfs perfectly.

    in reply to: Korean character is not displayed
    #28555

    In order to display non-Latin characters you need to utilize TTF embedding feature of PD4ML Pro.

    See: pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html

    Also for command line conversions I would recommend to use our tool Pd4Cmd:

    http://pd4ml.com/html-to-pdf-command-line-tool.htm

    in reply to: Turkish Character Problems
    #28556

    In order to display non-Latin characters you need to utilize TTF embedding feature of PD4ML Pro.

    See: pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html

    #28382

    I’ve been snowed under with other work but I’ve now been able to look at this again and have some more info on how this can be achieved.

    The major problem is that we can create the canvas content and capture it’s output from a non-browser environment. I’ve discovered the rather lovely envjs library that creates a browser DOM in pure javascript – you can even target different browser implementations. In conjunction with Rhino, it allows you to run browser javascript on the server.

    All we need to do now is emulate the canvas context object as a Java object that creates images – I’m tracking down a library as we speak. This means that the following should work;

    a) Design a rich HTML page with PD4ML tags within it and Canvas graphics
    b) Create a Rhino instance and add to it the envjs and a Canvas context emulator
    c) Run the HTML page through Rhino using an HTML parser and capture the resulting cavas images localy
    d) Run the HTML through PD4ML using the new canvas hook which returns the appropriate image from step c)

    Sounds like a lot, but actually I think this is pretty straightforward from a servlet point of view
    Anyone done this yet?

    Steve

    in reply to: General questions / FAQ
    #26571

    Hi all,

    When I call render() method I get the below error :

    “can not change default encoding Cp1252 to UTF8 as specified in the source HTML: the given input stream reader does not support reset()”.

    Stacktrace :
    version: PD4ML 361b2
    java.io.IOException: can not change default encoding Cp1252 to UTF8 as specified in the source HTML: the given input stream reader does not support reset()
    at org.zefer.html.doc.PD4MLHtmlParser.parse(Unknown Source)
    at org.zefer.html.doc.PD4MLHtmlParser.buildDocument(Unknown Source)
    at org.zefer.pd4ml.PD4ML.super(Unknown Source)
    at org.zefer.pd4ml.PD4ML.render(Unknown Source)

    Can anyone help me out to resolve this issue?

    – Thanks in advance.
    MallikarjunBK

    #28560

    A good workaround would be to use render(URL,…) method instead of render(InputStream,…)

    Another solution is to pre-read the source HTML into a byte array and to pass it to PD4ML.render() as a ByteArrayInputStream

    Also you may run JVM with -file.encoding=UTF8 command-line parameter or to use a render() method, which accepts an encoding name as a parameter, but in the case your Java code is going to be dependent on the document content you are going to convert.

    in reply to: General questions / FAQ
    #26572

    on my local windows computer works great, but on my remote linux server don’t.

    i use this code on linux
    java -Xmx512m -Djava.awt.headless=true -cp pd4ml_demo.jar Pd4Cmd ‘http://sierrasolutions.com.mx/cfdi/timbrada_cfdi.php?hola=65&#8217; 1000 LETTER -debug -out 1.pdf

    in reply to: localhost works, http don’t
    #28561

    Do you call the command from shell or from PHP script?

    How does the error expose itself?

    in reply to: localhost works, http don’t
    #28562

    on my localhost i get $result = 1, but on my http i get $result = 127

    in reply to: PD4ML Tips & Tricks
    #26573

    Im getting the empty pdf while converting the HTML to PDF, Not for all HTML.

    HTML which causes error contains multiple HTML & Body tags. Is it any constraints there in PD4ML?

    in reply to: Getting Empty PDF
    #28563

    Closing or tags are interpreted as a document end. PD4ML ignores any following HTML code.

    in reply to: page-break-inside: avoid Not Working
    #27557

    page-break-inside: avoid protects HTML element from being split.

    It forces a page break before table2 if there is a chance to keep table2 not broken. If table2 height is higher than page height – it does not force a page break, as the table will be broken in any case. If also does not force a page break if table2 fits the remaining space on a page.

    So if I understand you correctly, it works on your side as it should do.

    If you need to force a page break, you may use tag or page-break-before: always CSS style applied to a block element.

    in reply to: General questions / FAQ
    #26574

    Hi,
    if i give the html file to pd4ml which is having utf – 8 char for converting to pdf but in pdf file utf – 8 characters render like ?????
    means, “期購読お申し込” is replaced with “???????”

    I have also declare utf-8 charset in my html file using meta tag

    we have a licence version of pd4ml eventhoug we are not able to convert such html file to pdf with proper data.

    Below is my code :-

    public File runConverter(File inputFileName, File outputFileName) throws IOException
    {
    if (inputFileName != null && outputFileName != null)
    {
    PD4ML pd4ml = new PD4ML();
    pd4ml.enableSmartTableBreaks(true);
    if (inputFileName.length() > 0)
    {
    InputStreamReader isr = new InputStreamReader(new FileInputStream(inputFileName), “UTF-8”);
    java.io.FileOutputStream fos = new java.io.FileOutputStream(outputFileName);

    /* START: CONFIGURATION FOR PAGE ORIENTATION */
    try
    {
    pd4ml.setPageSize(pd4ml.changePageOrientation(PD4Constants.A4));
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    /* END: CONFIGURATION FOR PAGE ORIENTATION */

    /* START: CONFIGURATION FOR PAGE ORIENTATION */
    pd4ml.setPageInsets(new Insets(10, 10, 10, 10));
    /* END: CONFIGURATION FOR PAGE ORIENTATION */

    /* START: CONFIGURATION FOR PAGE HEADER */
    PD4PageMark pageMarkForHeader = new PD4PageMark();
    pageMarkForHeader.setAreaHeight(10);
    pageMarkForHeader.setHtmlTemplate(“Hi, this is for testing only that page is start
    “);
    pd4ml.setPageHeader(pageMarkForHeader);
    /* END: CONFIGURATION FOR PAGE HEADER */

    PD4PageMark pageMarkForFooter = new PD4PageMark();
    pageMarkForFooter.setAreaHeight(10);
    pageMarkForFooter.setInitialPageNumber(10);
    pageMarkForFooter.setHtmlTemplate(“Hi, this is for testing only that page is end
    “); // ${title} for title, ${page} for page number, ${total} for total number of pages
    pd4ml.setPageFooter(pageMarkForFooter);

    pd4ml.setHtmlWidth(780);
    pd4ml.render(isr, fos);
    }
    }
    return outputFileName;
    }

Viewing 15 posts - 1,306 through 1,320 (of 4,243 total)