Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26293

    I would like to know if it is possible to create a pdf file which we open, and the print dialog automatically opens too. It is said in the release notes that this functionality is already implemented.

    If so, what is the JSP taglib equivalent to do so? Is it in the “permissions” tag?
    Could you show me an example of usage?

    #27651

    In Java code it can be done like that:
    [language=Java:1l351ami]Map m = new HashMap();
    m.put(PD4Constants.PD4ML_PRINT_DIALOG_POPUP, “true”);
    pd4ml.setDynamicParams(m);[/language:1l351ami]

    Unfortunately there is still no JSP taglib mapping for the method. Please check if your JSP environments allows to locate tag instance:
    [language=java:1l351ami]<% org.zefer.pd4ml.taglib.PD4MLTransformerTag trt = (org.zefer.pd4ml.taglib.PD4MLTransformerTag) pageContext.getAttribute( "pd4ml.transformer.tag", javax.servlet.jsp.PageContext.REQUEST_SCOPE ); if ( trt != null ) { System.out.println("found"); } %>[/language:1l351ami]

    If it works you’ll be able to pass the dynamic params map to it

    trt.setDynamicParams(m);

    with the forthcoming PD4ML beta (v360b2).

    The missing mapping custom tags (, , ) for the method will be available with the final release v360.

    #27652

    @PD4ML wrote:

    The missing mapping custom tags (, , ) for the method will be available with the final release v360.

    Thanks! although i think that the tags are and

    The following code works for me:
    <br /> <pdf:transform screenWidth="800" adjustScreenWidth="true" pageFormat="LETTER" pageOrientation="portrait"<br /> pageInsets="3,3,3,3,mm" enableImageSplit="false" inline="true"<br /> fileName="file.pdf" interpolateImages="false"><br /> <pdf:parameters><br /> <pdf:parameter key="pd4ml.print.dialog.popup" value="true"></pdf:parameter><br /> </pdf:parameters><br /> <html><br /> <head><br /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br /> <title>JSP Page</title><br /> </head><br /> <body><br /> <h1>Hello World!</h1><br /> </body><br /> </html><br /> </pdf:transform><br />

    #27653

    Any chance to send the converted document directly to the printer?
    I mean, do not open a viewer and display the print dialog box, but print it directly.

    #27654

    @wilvec wrote:

    although i think that the tags are and

    Right, we changed my initial idea with the tag naming and managed to implement the feature in v360b2

    #27655

    @wilvec wrote:

    Any chance to send the converted document directly to the printer?
    I mean, do not open a viewer and display the print dialog box, but print it directly.

    The only way to print PDF silently is to run something like that on the client machine:

    AcroRd32.exe /t “C:document.pdf” “HP LaserJet 3300 Series PCL 6” “HP LaserJet 3300 Series PCL” “DOT4_001”

    or

    AcroRd32.exe /t “C:document.pdf” “\serverprintername” “Kyocera FS-1010” “192.168.0.1”

    For network printers sometimes it works without driver/port names:
    AcroRd32.exe /t “C:document.pdf” “\serverprintername”

    Of course the above is not usable for web application scenarios. In web applications (running acroread as a browser plugin) the silent print cannot be done for security reason.

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘General questions / FAQ’ is closed to new topics and replies.