Forum Replies Created
-
AuthorPosts
-
in reply to: Placing the pd4ml.lic in IIS December 6, 2022 at 18:09#35825
In the case you simply need to place the
pd4ml.lic
file to the Web application working dir.See for more info:
in reply to: Placing the pd4ml.lic in IIS December 6, 2022 at 18:13in reply to: Placing the pd4ml.lic in IIS December 6, 2022 at 18:33#35827Yes, I did have a look into that documentation but it didnt mentioned how to apply in IIS. I have also tried to place the license in each folder for the path where pd4ml.jar locate, it didnt seem to work. Whether the root folder, or child folder(s).
in reply to: Technical questions / Troubleshooting December 6, 2022 at 19:14#35828Hi,
Greetings. Hope you are well! I am trying to render a HTML stream using pd4ml v4. I am able to render the pdf however when i open the pdf it is only set at 70.4% zoom however when i do the same via pd4ml v3, i see pdf as “Fit to Width”. Below is the code i am using
//String PD4ML_DOCUMENT_VIEW_MODE ="pd4ml.document.view.mode"; oLog.infoForced("PD4ML_DOCUMENT_VIEW_MODE"+PD4ML_DOCUMENT_VIEW_MODE); org.zefer.pd4ml.PD4ML pd4ml = new org.zefer.pd4ml.PD4ML(); //com.pd4ml.PD4ML pd4mlNew = new com.pd4ml.PD4ML(); java.awt.Insets margins = new java.awt.Insets(30,25,30,25); // Add letter border (top, left, bottom, right) pd4ml.setPageInsetsMM(margins); pd4ml.setPageSize(org.zefer.pd4ml.PD4Constants.A4); pd4ml.protectPhysicalUnitDimensions(); pd4ml.interpolateImages(true); java.util.Map m = new java.util.HashMap(); m.put(org.zefer.pd4ml.PD4Constants.PD4ML_ABSOLUTE_ADDRESS_SPACE, "document"); m.put (org.zefer.pd4ml.PD4Constants.PD4ML_DOCUMENT_VIEW_MODE,"OneColumn"); pd4ml.setDynamicParams(m); //pd4mlNew.setDynamicData(m); //pd4mlNew.setParam(PD4ML_DOCUMENT_VIEW_MODE,"OneColumn"); java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); org.zefer.pd4ml.PD4PageMark footer = new org.zefer.pd4ml.PD4PageMark(); footer.setPageNumberTemplate("$[page] of $[total]"); footer.setPageNumberAlignment(org.zefer.pd4ml.PD4PageMark.RIGHT_ALIGN); footer.setColor(new java.awt.Color(0x303030)); footer.setInitialPageNumber(1); footer.setPagesToSkip(0); footer.setFontSize(11); footer.setAreaHeight(20); pd4ml.setPageFooter(footer); pd4ml.render(new java.io.StringReader(HTMLStream), baos); baos.close(); return baos.toByteArray();
I see setDynamicParams uses class setParam from v4
public void setDynamicParams(Map paramMap) { if (paramMap != null) { HashMap<Object, Object> hashMap = new HashMap<>(); for (String str : paramMap.keySet()) { if ("pd4ml.sessionid.append".equals(str)) { this.pd4mlNew.setParam("" + str, "" + paramMap.get(str)); continue; } if ("pd4ml.cache.enable".equals(str)) { this.pd4mlNew.setParam("" + str, "" + paramMap.get(str)); continue; } if ("pd4ml.document.date".equals(str)) { this.pd4mlNew.setParam("" + str, "" + paramMap.get(str)); continue; } if ("pd4ml.document.view.mode".equals(str)) { this.pd4mlNew.setParam("" + str, "" + paramMap.get(str)); continue; }
But i still has issues setting the default Page to “Fit Width”
I am using 4.0.15fx2 snapshot
Any suggestions, please?
Regards,
BharatAttachments:
You must be logged in to view attached files.in reply to: PD4ML_DOCUMENT_VIEW_MODE does not work December 7, 2022 at 15:55in reply to: PD4ML_DOCUMENT_VIEW_MODE does not work December 7, 2022 at 15:56#35831We are investigating the issue right now. Sorry it takes that long
in reply to: Technical questions / Troubleshooting December 7, 2022 at 19:53#35832Hi,
Greetings. Hope you are well! I am on pd4ml 4.0.13. I am trying to implement footer using the below code
<html> <head> <title>Header/Footer example</title> <style>BODY {font-family: Arial}</style> </head> <body> <!-- inline definition of the header/footer for the current and all following pages --> <pd4ml:page.header height=30>$[title]</pd4ml:page.header> <pd4ml:page.footer height=100>Total pages: $[total]</pd4ml:page.footer> <!-- here it overrides the header/footer set above starting from the current page --> <pd4ml:page.header height=30> <b>$[title]</b> $[page]/$[total] </pd4ml:page.header> <pd4ml:page.footer height=100> <div style='width: 100%; text-align: right'>Page: $[page]</div> </pd4ml:page.footer> </body> </html>
However i am able to see the Header but not the footer. Please see attached PDF
Can you please help me on populating only footer, right aligned on every page?
Regards,
BharatAttachments:
You must be logged in to view attached files.in reply to: Technical questions / Troubleshooting December 8, 2022 at 14:28#35834Hi,
Greetings. Hope you are doing well! I am generating a pdf using v4.0.13 and it looks like i do not see page breaks after the footer and there is also lot of white space at the end of every page. I am attaching the pdf from v3 and v4, html stream for v4. Can you please let me know how can i get the page break?
temp.pdf – generated by v4.0.13
COA 28 November 2022_Pega7.3.1.pdf – generated by v3
ParseToPDF.txt – Java to render pdf
noPageBreaks.html – HTML stream for temp.pdfAny questions, please do let me know!
Regards,
BharatAttachments:
You must be logged in to view attached files.in reply to: pdf generated does not have Page break after the footer, has whitespace December 8, 2022 at 14:43#35839Hi Bharat,
the page layout consists of absolute positioned blocks only, which caused the document height calculation logic to make incorrect assumptions, also impacting footer placements.
The currently available
v4.0.15fx2
snapshot build already resolves the issue. Please give it a try.in reply to: pdf generated does not have Page break after the footer, has whitespace December 8, 2022 at 15:16#35840Hi,
Greetings. Is there any workaround with v4.0.13? pd4ml is bundled with vendor software and i cannot use 4.0.15 in client environment as it requires update from vendor which is not in roadmap anytime sooner.
Regards,
Bharatin reply to: pdf generated does not have Page break after the footer, has whitespace December 8, 2022 at 15:31#35841I’m afraid even if we merge the fix into the v4.0.13 branch, the new build date will not be covered by the license code that comes with your product.
If you are not a PD4ML licensee, it is better you request a patch (updated PD4ML jar + license code) from the vendor.in reply to: pdf generated does not have Page break after the footer, has whitespace December 8, 2022 at 15:31#35842I’m afraid even if we merge the fix into the v4.0.13 branch, the new build date will not be covered by the license code that comes with your product.
If you are not a PD4ML licensee, it is better you request a patch (updated PD4ML jar + license code) from the vendor.in reply to: PD4ML_DOCUMENT_VIEW_MODE does not work December 8, 2022 at 22:36in reply to: Technical questions / Troubleshooting December 28, 2022 at 19:33#35874I’m using the code below with version 4.0.15 and the pageSize is “stuck” at 6.5″. When use an older version, 4.0.9fx, it renders correctly. I need to use 4.0.15 for ligature support. Any help is appreciated.
PD4ML pd4ml = new PD4ML(); pd4ml.setPageInsets(new Insets(25, 50, 0, 25)); pd4ml.setPageSize(PD4ML.LETTER); File pdf = File.createTempFile("result", ".pdf"); FileOutputStream fos = new FileOutputStream(pdf); pd4ml.render(PD4MLV3API.class.getResource("/test.htm"), fos); Desktop.getDesktop().open(pdf);
in reply to: V3 Rendering with 4.0.15 stuck at 6.5″ wide December 28, 2022 at 20:28#35875The issue is obviously depends on test.htm content. Can you please share it with us?
-
AuthorPosts