Forum Replies Created

Viewing 15 posts - 166 through 180 (of 4,246 total)
  • Author
    Posts
  • in reply to: PD4ML Tips & Tricks
    #26260

    Hi, I used PD4ML for a pretty major site, the new version of the Canadian Centre for Architecture (http://www.cca.qc.ca). Our client needed to be able to generate PDF versions of their content in both English and French. We did some research and came across PD4ML (for which Chris has written this great Ruby wrapper: http://extonrails.com/?q=node/26) and integrated it into our publishing system. So, whenever our client wanted to publish or re-publish their content, they would generate 6 files – 1 HTML file for display on the site, 1 HTML file for print purposes, and 1 PDF file (also for printing or distributing) x 2 languages. Big props to Chris Scott on this one! There were a few hurdles that we had to overcome though and the solutions are probably applicable to a lot of other PD4ML users:

    1. First, images with relative urls didn’t seem to work. The solution was obvious – use absolute urls for which we created a little Ruby helper method that prepended the full path to the image.
    2. Second, and much more frustrating! It seems that PD4ML doesn’t quite support all of the CSS I thought it would. Even though I had thought it supported font-family CSS properties, I could never get my basic font choices to appear in the PDF’s. This was really frustrating since our client, the CCA is pretty rigorous about which fonts it uses in publications. So the solution: I broke down and used the super old-school font-tag. Yeah, it really isn’t standard compliant and that kind of drives me nuts, but since the file generated is intended only for print and export to PDF I guess it works. And thats the point, it really does work and so the fonts I required are there.
    in reply to: HTML/CSS rendering issues
    #26261

    We have a strange issue where a customer generates a PDF on their computer and the font size comes out larger (14pt) than it does when we generate the exact same html on our computers (12pt). Anyone have any clue what could cause this?

    in reply to: General questions / FAQ
    #26262

    I have successfully built and deployed a PDF Generation solution using outline=”anchors”. Now I am trying to create a “headings” based solution and the result is incorrect. Can an example be posted that works based on the headings?

    The general flow of the page is:




    Title

    First Inner

    Second Inner

    Third Inner

    The generated bookmarks are of the outline form…
    <br /> - Title<br /> + Title<br /> - First Inner<br /> + First Inner<br /> - Second Inner<br /> + Second Inner<br /> - Third Inner<br /> + Third Inner<br />

    When it should be…

    <br /> + Title<br /> + First Inner<br /> + Second Inner<br /> + Third Inner<br />

    Further, the presents an appropriate hierarchy… What is necessary to create a set of PDF bookmarks that match the toc exactly?

    Can a small, complete taglib-based example be posted?

    in reply to: General questions / FAQ
    #26263

    I’ve generated properly looking pdf bookmarks using header #nameddest=xxxx.

    Has anybody an idea why ?

    in reply to: <pd4ml:transform outline="headings"> Example (?)
    #27536

    I used your exact sample HTML code and got a result as expected (see attachment).

    I would suspect there are some unclosed

    tags in your original document.

    If the reason of the corrupted bookmarks structure is still not clear, please send to PD4ML support the document to analyze.

    in reply to: <pd4ml:transform outline="headings"> Example (?)
    #27535

    It ended up being the pd4browser.properties file. If destinations=true and the tag specifies headings, you end up with a very strange set of bookmarks.

    in reply to: Troubleshooting
    #26264

    could you solve this?

    in my server win2003 32bit with jdk 1.5_6 (but is the same with jrockit listed below)

    when the generated pdf is over 100 pages the message is:

    16:07:18,046 ERROR [STDERR] BlockElement(p) {display=block, margin-top=scale (1.1699999570846558), margin-bottom=scale (1.1699999570846558), margin-right=0, ma
    gin-left=0}
    16:07:18,046 ERROR [STDERR] java.lang.StackOverflowError:
    16:07:18,046 ERROR [STDERR] at java.util.AbstractList.iterator(AbstractList.java:337)
    16:07:18,046 ERROR [STDERR] at org.zefer.d.c.v.public(Unknown Source)
    16:07:18,046 ERROR [STDERR] at org.zefer.d.c.v.public(Unknown Source)
    16:07:18,046 ERROR [STDERR] at org.zefer.d.c.v.public(Unknown Source)
    16:07:18,061 ERROR [STDERR] at org.zefer.d.c.v.public(Unknown Source)
    16:07:18,061 ERROR [STDERR] at org.zefer.d.c.v.public(Unknown Source)
    16:07:18,061 ERROR [STDERR] at org.zefer.d.c.v.public(Unknown Source)
    16:07:18,061 ERROR [STDERR] at org.zefer.d.c.v.public(Unknown Source)
    16:07:18,061 ERROR [STDERR] at org.zefer.d.c.v.public(Unknown Source)
    16:07:18,061 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,077 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,077 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,077 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,077 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,077 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,077 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,077 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,092 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,092 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,092 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,092 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,092 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,092 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,108 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,108 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,108 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,108 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,108 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)
    16:07:18,108 ERROR [STDERR] at org.zefer.d.c.v.oO0000(Unknown Source)

    my server configuration is :(dump file)

    Error Message: Illegal memory access. [54]
    Exception Rec: EXCEPTION_ACCESS_VIOLATION (c0000005) at 0x005C9646 – memory at 0x00000000 could not be read.
    Minidump : Wrote mdmp. Size is 1063MB
    SafeDllMode : -1
    Version : BEA JRockit(R) R27.2.0-131-78843-1.5.0_10-20070320-1457-windows-ia32
    GC Mode : Garbage collection optimized for throughput
    GC Strategy : Generational Parallel Mark & Sweep
    : Current OC phase is: not running. YC is running.
    : GC strategy for GC 29 was genparpar
    : GC strategy for GC 30 was genparpar
    : GC strategy for GC 31 was singleparpar
    : GC strategy for GC 32 was singleparpar
    : GC strategy for GC 33 was singleparpar
    : mmHeap->data = 0x00C00000, mmHeap->top = 0xA8500000
    : The nurserylist starts at 0x07727688 and ends at 0x7451EFF8
    : mmStartCompaction = 0x96BFFF88, mmEndCompaction = 0xA8500000
    : References are 32-bit.
    : Heap is not included in dumps.
    CPU : Intel Core (HT) SSE SSE2 SSE3 SSSE3 Core EM64T
    Number CPUs : 8
    Tot Phys Mem : 16373575680 (15615 MB)
    OS version : Microsoft Windows Server 2003 version 5.2 Service Pack 2 (Build 3790) (32-bit)
    Thread System: Windows Threads
    State : JVM is running (Main thread has finished)
    Command Line : -Dprogram.name=run.bat -Xms2560m -Xmx2560m -server -Dsun.rmi.dgc.client.gcInterval=300000 -Dsun.rmi.dgc.server.gcInterval=300000 -Djava.endorsed.dirs=C:javajboss-4.0.5.GA_NOCLUSTERbin\..libendorsed -Dsun.java.launcher=SUN_STANDARD org.jboss.Main
    java.home : C:javajrockit-R27.2.0-jdk1.5.0_10jre
    j.class.path : C:javajrockit-R27.2.0-jdk1.5.0_10libtools.jar;C:javajboss-4.0.5.GA_NOCLUSTERbin\run.jar
    j.lib.path : C:javajrockit-R27.2.0-jdk1.5.0_10bin;.;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem
    JAVA_HOME : C:javajrockit-R27.2.0-jdk1.5.0_10
    _JAVA_OPTIONS:
    PATH : C:javajrockit-R27.2.0-jdk1.5.0_10jrebin;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem
    C Heap : 99034 memory allocations have failed
    : First failure was a mmRealloc of 1048576 bytes
    : Last failure was a mmMalloc of 16777216 bytes
    StackOverFlow: 1 StackOverFlowError has occured
    OutOfMemory : 1 OutOfMemoryError has occured

    Thanks in advance !

    in reply to: General questions / FAQ
    #26265

    We are interested to buy your product but we are currently using the PDF Conversion software (DominoPDF) that is installed in our Lotus Notes Domino servers (under WindowsSystem32).

    This PDF conversion software that we are currently using is converting our Notes documents by calling the DLL (DominoPDF.dll) via LotusScript agent. According to searchdomino.com, the PD4ML jar file can be saved in a shared folder and be accessed in Lotus Notes agent coded in java. (see http://searchdomino.techtarget.com/tip/0,289483,sid4_gci1264609,00.html with Topic: Converting Lotus Notes Domino Web pages to PDF files with a Java agent)

    Our concern is can we use PD4ML without conflicting the DominoPDF conversion software? There is a need to retain the use of DominoPDF because it has the feature of PDF files merging in which currently is not yet available in your product (based in your General Questions/FAQ with Question: Is there a way to append pd4ml rendered pdf in an existing pdf file?)

    in reply to: Is PD4ML can work with other PDF Conversion Software?
    #27541

    PD4ML deos not rely to any native components or shared resources, so I see no reason for the conflicts.

    If the document merging is the only need for the DLL, I would recommend to use open source iText Java library to process documents, generated by PD4ML.

    in reply to: Troubleshooting
    #26266

    Hi I am using the Pro version Java API trying to render a UTF-8 page. I am calling a JSP page from a java class, and I have verified my page has both the tag for utf-8 as well as the jsp encoding type set properly as well. When I enable debugging, however, I get the following output:

    not yet in cache: java:fonts/pd4fonts.properties
    using content encoding from HTTP header: UTF-8
    new parse attempt with: ISO8859_1
    not yet in cache: java:fonts/arial.ttf
    read ‘arial’ from java:fonts/arial.ttf
    not yet in cache: java:fonts/arialbd.ttf
    read ‘arial bold’ from java:fonts/arialbd.ttf

    I can’t figure out where the ISO8859_1 is coming from. I verified my system property ‘file.encoding’ is also set to UTF-8. All my UTF-8 characters come out as junk on the page. The same page from a browser renders correctly, but incorrectly in the PDF.

    This is my code:
    java.io.FileOutputStream fos = new java.io.FileOutputStream(outputPDFFile);
    PD4ML pd4ml = new PD4ML();
    HttpSession session = request.getSession();
    session.setAttribute(RequestAttributeNames.USER_ATTRIBUTE, session.getAttribute(RequestAttributeNames.USER_ATTRIBUTE));
    pd4ml.useServletContext(request.getSession().getServletContext());
    pd4ml.setSessionID(request.getSession().getId());

    Cookie[] cookies = request.getCookies();
    for(Cookie cookie: cookies){
    pd4ml.setCookie(cookie.getName(), cookie.getValue());
    }

    pd4ml.setPageInsets(new Insets(40, 20, 40, 20));
    pd4ml.setHtmlWidth(950);
    pd4ml.enableDebugInfo();

    pd4ml.useTTF( “java:fonts” true );
    pd4ml.setDefaultTTFs(“Times New Roman”, “Arial”, “Courier New”);
    }
    pd4ml.render(“http://blah.jsp&#8221;, fos);
    fos.close();

    Is there any way to see what the debug message ‘new parse attempt with: ISO8859_1’ is coming from? Without the source of the library it’s hard to tell what is going on.

    Ryan

    in reply to: Problem rendering UTF-8 pages..
    #27542

    I found the problem, it was not with my library but an errant tag that was setting the charset to 8859-1, which was confusing pd4ml. After correcting that my utf-8 characters are now correct.

    in reply to: <pd4ml:transform outline="headings"> Example (?)
    #27537

    We’ve just cleaned up the outline generation code and now it works correctly in all modes. The fix will be available with v351b12 (or most probably we’ll skip b12 and publish it as the final release)

    in reply to: generated bookmarks not accessible with URL parameters
    #27538

    will work correctly in the final release of version 351

    in reply to: image rotation
    #27492

    PD4ML does support the feature. However it is undocumented – we use it only in special applications.

    Please contact support by email for the details.

    in reply to: Automatic kerning
    #27498

    For the time being PD4ML does not support the feature.

    There is a technical problem: for HTML layouting PD4ML needs to have a possibility to measure PDF string widths from Java. In regular mode it is easy to do – it is just a sum of string character widths. The character widths can be taken from TTF fonts metrics or from Acroread built-in fonts metrics (The acroread font metrics are hardcoded to PD4ML lib).

    If we rely to the autokerning feature of PDF format – we cannot get anymore the exact width of a particular string, until we re-implemented kerning algorithms of Acroread, for example. We did not address the issue yet.

Viewing 15 posts - 166 through 180 (of 4,246 total)