Forum Replies Created

Viewing 15 posts - 1,546 through 1,560 (of 4,249 total)
  • Author
    Posts
  • in reply to: initialPageNumber
    #28398

    Hello,

    thank you very much for your answer…
    The first part of the answer solved the problem completely.
    That’s exactly the command I was looking for..

    The second part I explained very poorly. Within the company I work for, we use certain tags to label specific parts, kind of like price tags.
    These tags are supposed to be containing consecutive numbers..
    Therefore we have to make sure, that each number is only printed once..
    If we open the PDF file, even with the printing dialog directly opened, there still is the chance, that the file with for example the numbers 1 through 30, is printed multiple times. We are looking for a way to properly print the PDFs once and only once.
    Our current approach would be to create the file and save it on the server (temporarily) and sent it to a printer selected by the user via network. After it was successfully printed, the file will be deleted and the first new number to be used will be saved in a database and used for generating the next set of “tags” with new numbers.

    I think that might be the most practical solution, since using the command line in combination with a webserver will get really difficult very quickly…

    If you can offer any other idea, we would be more than happy to give it a try…

    Thank you for your help!

    Kind regards
    Niels Göran

    in reply to: Troubleshooting
    #26634

    We have purchased this product and configured with one of our internal web application which requires single sign on authentication using SiteMinder.

    <%@ taglib uri="http://pd4ml.com/tlds/pd4ml/2.6" prefix="pd4ml" %><%@page contentType="text/html; charset=ISO8859_1"%>

    This generates a PDF with login screen of my application instead of having content of pd4mlTest.jsp.

    Please let us know how to resolve this issue?.

    Thanks in advance,
    Sudhakar.K

    in reply to: General questions / FAQ
    #26635

    My html file contains images in BMP format encoded as BASE64 (see example.zip).

    I downloaded the demo version of PD4ML and run the Converter.class to do a quick test:

    java -Xmx512m -cp pd4ml_demo.jar;ss_css2.jar;. Converter example.html example.pdf “” “”

    The GIF image has been successfully converted in the PDF file. But the BMP file is missing (see example.pdf).

    Does pd4ml support BMP files?

    in reply to: BMP in BASE64 encoding
    #28724

    Does the BMP have transparency mask?
    Could you please publish the image in its original form (as BMP file)?
    Thank you!

    in reply to: BMP in BASE64 encoding
    #28725

    Please find the file signature.bmp in the attached signature.zip file.

    in reply to: BMP in BASE64 encoding
    #28726

    Well, with your sample image we identified and fixed a bug in our code, related to 1-bit bitmap images.

    However when I tried your original HTML sample with base64-encoded images, the BMP still failed to appear in the resulting PDF. Which is quite strange.

    I have dumped base64-decoded image (“bad image”) and the second image you provided (“good image”). There is a difference in the file headers (the rests of the images are identical). See the attachment.

    It is difficult to say if the “bad image” has been corrupted during base64 encoding or it is a species of BMP format, known only to Microsoft.

    The impacted bytes are quite important:

    Good image:
    File type is :BM
    Size of file is :4990
    Size of bitmapinfoheader is :40
    Width is :342
    Height is :112
    Planes is :1
    BitCount is :1
    Compression is :0
    SizeImage is :4928
    X-Pixels per meter is :0
    Y-Pixels per meter is :0
    Colors used are :2
    Colors important are :2

    Bad image:
    File type is :BM
    Size of file is :4990
    Size of bitmapinfoheader is :40
    Width is :342
    Height is :112
    Planes is :1
    BitCount is :1
    Compression is :0
    SizeImage is :0
    X-Pixels per meter is :2834
    Y-Pixels per meter is :2834
    Colors used are :2
    Colors important are :0

    It looks like MS IE repairs the “bad image” on-a-fly and displays it correctly. If you save the image from MS IE you’ll get an image byte-to-byte identical to the “good image”.

    We would implement a workaround for such corrupted images, but it is not obvious how to obtain the missing “size of the raw bitmap data” value.

    in reply to: initialPageNumber
    #28399

    So the print jobs are going to be initiated from the server side (not from client PC)? In the case you’ll anyway need to execute some print command line. I have my doubts if there is an easy way to talk from an application server to a printer (and to render/print a PDF, which is another level of complexity).

    As for me a print.bat file with a singe command like
    AcroRd32.exe /t %1 “\serverprintername” “Kyocera FS-1010” “192.168.0.1”
    is quite a straightforward solution to be executed from the server like that:

    [language=java:2hutn6hr]String cmdstart[] = { “cmd.exe”, “/c”, “print.bat”, tempPdfLocation };
    Runtime.getRuntime().exec(cmdstart);[/language:2hutn6hr]
    Of course, printer names/locations could be passed to the script as a parameter as well.

    in reply to: Problem with ampersand
    #28719

    Yes, it looks like a bug in the converter.
    I’ve just opened a ticket to be resolved with the next beta release.

    in reply to: Troubleshooting
    #26636

    Hello,
    I keep getting NPEs when I’m attempting to render an RTF doc.

    Below is the test.

    Thanks,
    Nathan

    <br /> package com.nwest.tests.pd4ml;<br /> <br /> import java.io.ByteArrayOutputStream;<br /> import java.io.IOException;<br /> import java.io.StringReader;<br /> <br /> import org.zefer.pd4ml.PD4Constants;<br /> import org.zefer.pd4ml.PD4ML;<br /> <br /> public class PDFConverterTest<br /> {<br /> private static String doesNotWork = "<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>blah</title></head><body><div>test</div></body></html>";<br /> private static String works = "<html xmlns="http://www.w3.org/1999/xhtml"><head><title>blah</title></head><body><div>test</div></body></html>";<br /> <br /> public static ByteArrayOutputStream createDocument(String pageOrientation, String documentContent, String format)<br /> throws IOException<br /> {<br /> PD4ML pd4ml = new PD4ML();<br /> <br /> if (format.equals(PD4Constants.PDF) || format.equals(PD4Constants.RTF))<br /> {<br /> pd4ml.outputFormat(format);<br /> }<br /> <br /> StringReader reader = new StringReader(documentContent);<br /> ByteArrayOutputStream baos = new ByteArrayOutputStream();<br /> <br /> pd4ml.render(reader, baos);<br /> <br /> return baos;<br /> }<br /> <br /> public static void main(String args[]) {<br /> try {<br /> PDFConverterTest.createDocument("landscape", works, PD4Constants.RTF);<br /> System.out.println("no meta works");<br /> <br /> PDFConverterTest.createDocument("landscape", doesNotWork, PD4Constants.RTF);<br /> System.out.println("doesNotWork");<br /> <br /> } catch (IOException e) {<br /> <br /> }<br /> }<br /> }<br /> <br /> <br />

    in reply to: getting NullPointerException when "Content-Type" is set
    #28733

    Thank you for the report!

    We’ve just fixed the issue in the development build. The fix will be available with the next beta release.

    in reply to: Auto XSL transform before render
    #28721

    > “/userdata/includes/arialScreenReg.css”
    Is in the path /userdata is a web application name or just a legacy path, which currently makes no special sense?

    in reply to: Auto XSL transform before render
    #28722

    Yes…its just a path. But as I tried to explain in my post, it really should be:

    without the starting ‘slash’. But as our current software handles this just fine, it was only an issue when I started to look for a replacement. Another product allows a use of an XSL tranformer to be applied before the conversion of HTML to PDF and I was wondering if PD4ML had something similar. If not, I figure I have 2 choices…either do the XSL transformer before calling PD4ML or have the client manually update their hundreds of HTML files. Just wanted to make sure I did not miss any functionality of PD4ML. Thanks.

    in reply to: Auto XSL transform before render
    #28723

    For web scenarios PD4ML JSP taglib offers a tag to pre-process such type of paths, however it makes nothing special: it looks for a given pattern (for example, “”/userdata/includes”) and substitutes it with a desired string (“”userdata/includes”) . It works with the source HTML document as with a single string, ignoring the document structure – you could always implement your own similar solution.

    But I would recommend you to create a simple custom resource loader:
    post43.html
    and to interpret the “non-standard” paths the way you like.

    in reply to: Problem with ampersand
    #28720

    Just tested with the development build 3.80 – the issue has been already solved. However the version still did not pass all QA tests. It should not take longer than one week.

    in reply to: HTML/CSS rendering issues
Viewing 15 posts - 1,546 through 1,560 (of 4,249 total)