PDFJS: Text layer rendering twice - angularjs

Here's the context:
pdfjs-dist: v2.2.228
angualar/core: 8.2.0 (hybrid Env with an AngularJs 1.5.X)
Objective: to upgrade pdfjs-dist to the latest versions (2.3.200 or at least 2.2.X)
I upgraded from pdfjs-dist 2.0.4xx, and here's what is being rendered:
So basically, instead of having the PDF rendered correctly, with highlightable text and so on, there's like a duplicate of the text: one version of the text is rendered correctly (graphically), the other version seems to work OK for text selection and searching.
When doing any search, PDFFindController works on the highlightable layer (as you can see the area with the greenish text in the upper part of the image).
Any idea what might cause this behavior?

this is due to the new update of PDFjs requires css file to style the pdf.
you can get more details on this from the following question's answer
PDFJS: error on Text rendering for the PDF

Related

AutoCompleteTextField using setCompletionRenderer line breaks in long text not working

Windows 10 Pro
NetBeans 12.3
Simulator is latest.
On July 19, 2016 at 8:07 pm a question was posed to you regarding making the popup list break lines for long text?
see https://www.codenameone.com/blog/dynamic-autocomplete.html
At that Time you responded "dynamic line breaking is problematic with renderers so that won’t work."
Has this changed?
Is there any way to span lines in the List?
I created a renderer with TextField and set setSingleLineTextArea and setGrowByContent true however The List object does not break lines.
Thoughts?
Regards
With renederes getting multiple lines will always be problematic. You can just use a TextField and show an InteractionDialog popup below as you type. In it you can put whatever you want in terms of layout/components.
You can use the DataChangeListener to update the content of the dialog. This is obviously a bit more challenging than using the "simple" auto complete. But it gives you 100% control over the content.

Why does a search engine summary contain text that is not in any of the static html files?

I have a hugo site, and on a search engine (Duckduckgo), my site's summary is:
Add your own "layouts/partials/hero.html" to replace this text.
I tried looking for the string hero in the files in my public folder, can't seem to find it.
I have added this file with some content. Nothing seems to happen. Do I need to edit the theme files or something?
Edit: changed title to make problem clearer. The original question asked about "hero cards", which I thought might have been a standard search engine friendly part of a website.
I think I understand what is happening now. I originally installed the base16 theme which does contain the text:
Add your own "layouts/partials/hero.html" to replace this text.
( it is in the file themes\base16\layouts\partials\hero.html.).
I should have realised, but search engines take time to re-index a site. I originally published the site using base16 with some text unedited. Duckduckgo was showing that old text, it will probably disappear in time when the site is reindexed.
The answer is in the documentation for the base16 theme:
You probably want to edit the homepage. Get started by copying the
supplied homepage to your own site.
$ mkdir -p layouts/partials
$ cp themes/base16/layouts/partials/hero.html layouts/partials/hero.html
After this, you can edit layouts/partials/hero.html and make it
awesome.
The default layouts/partials/hero.html contains the code Add your own "<code>layouts/partials/hero.html</code>" to replace this text., which is what DuckDuckGo was using to make its summary. As you noted in your answer above, if you edit this file then the DuckDuckGo summary should change when DuckDuckGo next indexes your site.

how to change default color of column graph using GemBox version 37.3.30.1160

how to change default color of column graph using GemBox version 37.3.30.1160.
If I create a .xlsx template and save the same it will work but I am trying to save the file as PDF and that's where its not working.
EDIT 2019-11-15:
In newer versions of GemBox.Spreadsheet (version 4.5 and above) we added support for chart formatting, see the version history page.
You can find Excel Chart Formatting example here. Also, here is another example in C# that shows how to change color of various chart parts like series, background, text, etc.
ColumnChart chart = ...
chart.SelectData(worksheet.Cells.GetSubrangeAbsolute(0, 0, 12, 1), true);
var red = DrawingColor.FromName(DrawingColorName.Red);
var green = DrawingColor.FromName(DrawingColorName.Green);
var blue = DrawingColor.FromName(DrawingColorName.Blue);
chart.Series[0].Fill.SetSolid(blue);
chart.Series[0].Outline.Fill.SetSolid(red);
chart.Fill.SetSolid(green);
chart.PlotArea.Outline.Fill.SetSolid(red);
chart.Outline.Fill.SetSolid(red);
ORIGINAL ANSWER:
GemBox.Spreadsheet currently does not have an API support for chart components styles. This information is currently supported only through a preservation and that is why it works for XLSX file, but the preserved information is lost when the input and output file format are not the same and that is why it does not work for PDF files.
However note that we do intend to implement this sometime in the future and if interested please feel free to vote for this feature in order to boost its priority.
But at this moment I cannot tell you exactly when it will be implemented.

Drupal 7 - wysiwyg & images

I need to insert images into the copytext of a blogpost. I tried different wysiwyg-editors and different image-plugins, but so far every plugin or editor I tried directly adds an <img>-tag into the text.
My problem is, that I want to change the markup of the images when the frontend is rendered. Is there any plugin that does not add an <img>-tag, but some short code or so that gets translated into an -tag when the field is rendered, similar to wordpress?
That way I could hook into the process and change the markup of the images...
Lately I've been working on a combination of these modules to work with customized markup:
CustomFilter
BUEditor
Markdown filter
Markdown Editor for BUEditor
BUEditor and Markdown filter will give you markup-based input that you can than manipulate via RegEx with CustomFilter.
CustomFilter is kind of confusing and a bit of a pain to use, so be ready to bang your fist into your head a few times, but it's totally worth it. It' much easier than the alternative, which would be defining your own custom filter module.

Dynamic Hyperlink in Livecycle Form

I am trying to figure out how to make a hyperlink in a Livecycle Form which points to a URL which will change on different days that the form is rendered. For example on one day I might want the hyperlink to point to:
mywebsite/mypage?option=XXX
and on another day I want it to point to:
mywebsite/mypage?option=YYY
The XXX and YYY can be passed into the form's data pretty easily as XML, but I just don't know how to make it so that the hyperlink is changed to correspond to this.
Any suggestions?
This can be accomplished with JavaScript in LiveCycle Designer. The following script, placed on the Form's docReady event will let you dynamically change the URL of a text object.
form1::docReady - (JavaScript, client)
// If this code is running on the server, you don't want it to run any code
// that might force a relayout, or you could get stuck in an infinite loop
if (xfa.host.name != "XFAPresentationAgent") {
// You would load the URL that you want into this variable, based on
// whatever XML data is being passed into your form
var sURL = "www.stackoverflow.com"; // mywebsite/mypage?option=xxx
// URLs are encoded in XHTML. In order to change the URL, you need
// to create the right XHTML string and push it into the Text object's
// <value> node. This is a super simple XHTML shell for this purpose.
// You could add all sorts of markup to make your hyperlink look pretty
var sRichText = "<body><p>Foo</p></body>";
// Assuming you have a text object called "Text1" on the form, this
// call will push the rich text into the node. Note that this call
// will force a re-layout of the form
this.resolveNode("Text1").value.exData.loadXML(sRichText, false, true);
}
There are a couple of caveats: URLs in Acrobat are only supported in Acrobat 9.0 and later. So if someone using an older version of Acrobat opens your form, the URLs won't work.
Also, as you can see from the "if (xfa.host.name !=...)" line, this code won't run properly if the form is being generated on the server, because forcing a re-layout of a form during docReady can cause problems on certain older versions of the LiveCycle server. If you do need to run this script on the server, you should probably pick a different event then form::docReady.
I a number of complaints from users in WorkSpace that clicking links opened them in the same tab so they lost their WorkSpace form, and there's no option to change that in Designer 11. I think the solution I came up with for that would work for you too.
I made buttons with no border and no background, and in their click event have this line (in Javascript, run at client)
app.launchURL("http:/stackoverflow.com/", true);
It would be easy to add some logic to choose the right URL based on the day and it doesn't cause any form re-rendering.
In some spots where the hyperlink is in line with other text, I leave the text of the link blue and underlined but with no hyperlink, and just place the button (no background, no border, no caption) over it. Does require positioned and not flowed subforms for that to work, so depending on your layout it could get a little clunky.
Wow, just realized I am super late to the party. Well, for anyone using ES4 facing a similar problem . . .
Ended up using a 3rd party component to manipulate the PDF's hyperlinks...wish there was a better solution as this one costs about $1000.

Resources