Forum Replies Created
-
AuthorPosts
-
in reply to: "Pd4ml.render" take long time to process March 18, 2010 at 09:46#27879
Please forward the questions again to Igor. Missing of generatePDFA() method, means you use old version of PD4ML (probably it is cached in the database).
It would also help if you uncomment DXL dump method in the agent code and send the output to us. It should help us to reproduce the issue and to provide you with a tuned XSL stylesheet.
in reply to: "Pd4ml.render" take long time to process March 16, 2010 at 10:47#27877Please request the most recent XSL stylesheet and the reference agent code from support pd4ml.com by email.
I suspect the following: the default XSL stylesheet of the demo Notes database represents attachment files as
<pd4ml:attachment src="data:a-lot-of-base64-data">It takes a lot of time to parse such huge attribute value (if we are talking about tens of megabytes) and constantly reallocate string to store it.
The most recent XSL allows either to temporarily store the attachment to TMP directory and to refer to it from the attachment tag:
<pd4ml:attachment src="file:/tmp/xxxyyyzzz.bin">or to represent the attachment as tag body<pd4ml:attachment>data:a-lot-of-base64-data</pd4ml:attachment>. Both approaches are intended to solve the performance issue.in reply to: Double byte support March 16, 2010 at 10:22#27886You need to utilize TTF embedding feature of PD4ML Pro:
in reply to: Dynamic change of PDF page orientation March 15, 2010 at 16:25#27597As I wrote before the scale factor is computed this way:
scale = (pageFormat.width – insets.left – insets.right) / htmlWidthIn your case a switch from portrait to landscape means change of pageFormat.width from 595 to 842. You need to correspondingly/proportionally increase htmlWidth parameter.
in reply to: Dynamic change of PDF page orientation March 15, 2010 at 12:14#27595Unfortunately currently there is no easy way to do that.
The horizontal margins (insets) impact HTML-to-PDF scale factor:
scale = (pageFormat.width – insets.left – insets.right) / htmlWidth
so a lot of flexibility in page-specific margins definitions could cause undesired drawbacks.However a swap of insets.left and insets.right depending on odd or even page seems to be doable and harmless. And I guess the limited feature would be sufficient for your case.
We are ready to add it to our API. The implementation priority would depend on the PD4ML license type you own / are going to order. Please contact PD4ML support by email.
in reply to: scale html page to fit? March 14, 2010 at 05:45#27561Do you use PD4Browser (java -jar pd4ml_demo.jar) or Pd4Php?
in reply to: Is it possible to set header/footer scope via the API? March 14, 2010 at 05:45#27836It is possible with overriding of template methods. For example the code below defines different footers for even and odd pages.
PD4PageMark footer = new PD4PageMark() { public String getHtmlTemplate(int pageNumber) { if ( pageNumber % 2 == 0 ) { return "<html>...template 1...</html>"; } else { return "<html>...template 2...</html>"; } } }; footer.setAreaHeight(50);Please take into account – even if you define return “”; for some pages there, it will allocate the defined footer space 50px anyway.
footer.setAreaHeight(-1); autocomputes the footer heigh using the template code, returned for the first page.
The following methods of PD4PageMark are overridable:
- String getHtmlTemplate( int pageNumber )
- Color getPageBackgroundColor( int pageNumber )
- String getPageBackgroundImageUrl( int pageNumber )
- String getPageNumberTemplate( int pageNumber )
- String getTitleTemplate( int pageNumber )
- Font getFont( int pageNumber )
in reply to: Automatically open print dialog March 14, 2010 at 02:35#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.
in reply to: lang.NoSuchMethodError: org.zefer.pd4ml.PD4ML.generatePdfa March 8, 2010 at 18:34#27234It looks like there is an older instance of pd4ml(_demo).jar on the server. Check all shared lib/ and cache directories of the server and remove the JARs. The best place for PD4ML libs is WEB-INF/lib
in reply to: Right margin overflow March 4, 2010 at 18:13#27254It would help a lot if you attach an example of a problematic document (its HTML source and resulting PDF).
If HTML layout width does not fit horizontal PDF space, most probably the problem can be solved by increasing of htmlWidth parameter value. If some text crosses right table border – it looks like a bug in our code (however since the last 3-4 years we did not face such issue).
in reply to: Regarding direct print through default printer & Preview February 28, 2010 at 23:11in reply to: Newbie question: How to page break February 19, 2010 at 17:36#27864Well, XHTML tries to close tags. Try
<pd4ml-page-break/>in reply to: Newbie question: How to page break February 19, 2010 at 13:49#27862The main PD4ML page break tag is
<pd4ml:page.break>, however there are environments where the tag syntax may be reported as an error.- Some JSP containers do not allow dots in the tag name, so PD4ML JSP taglib includes the tag synonym
<pd4ml:page_break>. But take into account: the tag works only in JSP. - In XHTML and XSL world “pd4ml” namespace may cause validation problems. For the case later we introduced yet another tag synonym
<pd4ml-page-break>
Also CSS offers some ways to break page. For example: page-break-before: always applied to a block element (
<div>, <table>etc)in reply to: Deploy in .net 2.0 February 17, 2010 at 17:23in reply to: Deploy in .net 2.0 February 17, 2010 at 17:22#27860Could you please post the “outfile” content here or send it to support pd4ml com.
-
AuthorPosts
