Forum Replies Created
-
AuthorPosts
-
in reply to: PD4ML Tips & Tricks January 10, 2017 at 11:14#27121
Hi Folks,
We have a requirement wherein, we need to display some hyperlinks within a PDF generated from PD4ML as non-actionable. By non-actionable I mean just pure plain text. It should not have an underline as urls have and it should not show up as a URL on hovering the mouse on top of it. It should be as plain text.
The urls are present within a tag and there is no anchor tags, however the PDF what we view from the Adobe PDF Reader still treats these plain text as hyperlinks. Now we are aware that this is a feature of the reader app to treat a qualified url string as a hyperlink. But as per our requirement we want to somehow override this feature from within the PD4ML so that they are not treated as such.
I am also aware that we can turn off this feature from the Preferences in Adobe Reader, however that will turn off all the URLs. We need to only disable it in some sections of the PDF.
Is there a way to embed some code within the PDF using PD4ML so that the reader does not treat a specific url as hyperlink within a PDF?
Thank You In Advance!!
in reply to: HTML/CSS rendering issues January 10, 2017 at 11:16#27120Hi Folks,
We have a requirement wherein, we need to display some hyperlinks within a PDF generated from PD4ML as non-actionable. By non-actionable I mean just pure plain text. It should not have an underline as urls have and it should not show up as a URL on hovering the mouse on top of it. It should be as plain text.
The urls are present within a tag and there is no anchor tags, however the PDF what we view from the Adobe PDF Reader still treats these plain text as hyperlinks. Now we are aware that this is a feature of the reader app to treat a qualified url string as a hyperlink. But as per our requirement we want to somehow override this feature from within the PD4ML so that they are not treated as such.
I am also aware that we can turn off this feature from the Preferences in Adobe Reader, however that will turn off all the URLs. We need to only disable it in some sections of the PDF.
Is there a way to embed some code within the PDF using PD4ML so that the reader does not treat a specific url as hyperlink within a PDF?
Thank You In Advance!!
in reply to: Non-Actionable URLs in PDF generated through PD4ML January 10, 2017 at 11:18#29984pd4ml.disableHyperlinks() should do the trick.
in reply to: Non-Actionable URLs in PDF generated through PD4ML January 10, 2017 at 11:18in reply to: Non-Actionable URLs in PDF generated through PD4ML January 10, 2017 at 11:27in reply to: Non-Actionable URLs in PDF generated through PD4ML January 10, 2017 at 11:48#29986OK, now I see your point. The issue is know (i.e. post3894.html#p3894 ) and we tried to find a workaround multiple times.
As far as I remember the last promising idea was to overlay entire page with a transparent image (or annotation area, or anything else to screen hyperlinks). I’ll try to find the investigation results and share with you.
in reply to: Non-Actionable URLs in PDF generated through PD4ML January 10, 2017 at 13:17#29987Unfortunately it still can “see” the hyperlinks even “through” an overlaying image.
We did not test an approach to place a transparent object (a vector rectangle) over the hyperlink and to assign a dummy PDF script handler to it. But I think it would result other visual flaws.
So the only existent workaround is to damage a hyperlink representation: i.e. to pre-process HTML and to insert a space character after “http://”.
in reply to: Non-Actionable URLs in PDF generated through PD4ML January 10, 2017 at 16:47#29988@PD4ML wrote:
Unfortunately it still can “see” the hyperlinks even “through” an overlaying image.
We did not test an approach to place a transparent object (a vector rectangle) over the hyperlink and to assign a dummy PDF script handler to it. But I think it would result other visual flaws.
So the only existent workaround is to damage a hyperlink representation: i.e. to pre-process HTML and to insert a space character after “http://”.
Thank you and yeah, I was aware of this workaround however just wanted to know if there was anything else that we can do apart from this from PD4ML end to get around this problem. Also, even if you break the url to http:// and a space and then the trailing part of the URL, the http:// part will still show up as a hyperlink. The only other way to resolve this is to remove http:// completely and adding a www and a space for ex: “www google.com” or simply “google.com”
in reply to: Troubleshooting January 12, 2017 at 16:18#27122Hi,
I’m facing an issue with pd4ml. When printing a document in pdf, i realize that the title (the html title) appears in others Browsers like FireFox and Chrome. But in Internet Explorer it’s the server name which appears.
What i mean is that, in the head of a html document like the one below, the value in title element doesn’t appears in Internet explorer. Can someone knows this issue?
This title
in reply to: Troubleshooting January 19, 2017 at 06:17#27125By using pd4ml, I have converted the html to pdf.
The issue is the right side margin and the content from right side margin for few points are missing.
I have converted that to” A4″ paper size.
Page orientation used is “portrait”.
Please help me to figure out what could be the possible causes for the issue and how to solve the issue.
in reply to: Vertical text writing-mode:tb-rl not working 3.9 January 30, 2017 at 09:03#29573Is there any alternative for transform: rotate(-270deg) as writing-mode :tb-rl does not work for 270 deg.
in reply to: HTML/CSS rendering issues February 1, 2017 at 12:32#26956We are mentioning the font size as 10pt in the HTML stream but generated PDF is getting rendered in 11pt
code Snapshot:try{
String sContent=sHtml;
org.zefer.pd4ml.PD4ML pd4ml = new org.zefer.pd4ml.PD4ML();
//pd4ml.resetAddedStyles();
pd4ml.setPageInsetsMM(new java.awt.Insets(10, 21, 0, 16));
pd4ml.enableImgSplit(false);
//pd4ml.addStyle(“color:#8866ff; font-family:Times;”,true);
java.io.ByteArrayOutputStream os=new java.io.ByteArrayOutputStream();
java.io.InputStream is=new java.io.ByteArrayInputStream(sContent.getBytes());
java.io.InputStreamReader ris=new java.io.InputStreamReader(is);
pd4ml.setCookie(“JSESSIONID”,JSESSIONID);
pd4ml.setCookie(“Pega-RULES”,PEGARULES);
//String sFontsProp=”/opt/jdk1.7.0_67/jre/lib/fonts/fonts.properties”;
pd4ml.useTTF(FontsProp,false);
java.net.URL base=new java.net.URL(BASEURL);
pd4ml.render(ris,os,base);byte[] byteArray=os.toByteArray();
// Action == Preview
if (Action.equalsIgnoreCase(“Preview”)){
String sPDF=Base64Util.encodeToString(byteArray);
ClipboardPage workpage = tools.findPage(“pyWorkPage”);
workpage.putString(“PDFDocument”,sPDF);
}else {
tools.putParamValue(“PDFDocument”,byteArray);
}}catch(Exception e){
throw new PRRuntimeException(e.toString());
}in reply to: Mentioned Font size is not rendering in Generated PDF February 1, 2017 at 17:53#29583Initially PD4ML renders a document as for a screen representation (converted all physical units to screen pixels with 72dpi). After the layout is rendered it is stretched or shrank to match the target paper page width. See
http://pd4ml.com/cookbook/pdf_page_formatting.htmif you need to keep physical unit dimensions to exact on the paper, you either need to play with htmlWidth parameter or to trigger pd4ml.protectPhysicalUnitDimensions().
(A drawback of the API call is a possible misbalance of resulting sizes of objects whose dimensions given in physical units and ones defined in screen pixels)
in reply to: General questions / FAQ February 2, 2017 at 04:18#27127PDFML Watermark images How do I display it in the printer only when it is not displayed in the viewer?
or
PDFML page headers/footers How do I display it in the printer only when it is not displayed in the viewer?
please answer about my question…
in reply to: Can PDFML Watermark images be displayed only on the printer? February 2, 2017 at 11:49#29998As far as I know PDF file format allows to control visibility (separately for screen and print) only for form objects and watermarks. We plan to add the visibility control option for watermarks in the forthcoming PD4ML release.
For general content, like headers/footers there is no obvious way to implement the feature. But we’ll check if it can be done with action scripting.
-
AuthorPosts