How to insert an Image in WORD after a bookmark using OpenXML - c#-4.0

I am using a word document which has a bookmark inside that. My requirment is to insert an icon after each bookmark using OpenXML 2.0 with C# 4.0.
I tried to use Image content control and the reflected code from OpenXMLSDK tool.
Somehow it got worked but now I am getting the full size controls. Also each image has an icon into that for change picture. Can anyone tell me that how can I reduce the size of the picture content control and if possible remove that extra icon.
Also, if anyone has better idea to insert the icon after each bookmark?
Somehow inserting an image using OpenXML is not that developer friendly.
Please help on this.

The best way to learn how to do something in Open XML is to use - Open XML SDK 2.0 Productivity Tool. You could insert the icons you need manually in MS Word first, save the document and them - open this file in Open XML SDK 2.0 Productivity Tool (which is a part of Open XML SDK 2.0). Then - find the bookmarks and icons you inserted and see how to do that programmaticaly:
Hope that helps!

Related

How to hook a Window Form within Microsft Excel from VBA?

I'm trying to hook a Window Form within Microsoft Excel itself like on the attached picture (This is an Addin called Kutools).
It is supposed to:
Fit on the right side of the Row number
Be Just below the name box
Be resizable and the window is resizable with it as well
Be collapsible or Expandable (like on the image)
I prefer to use the internal VBA of Excel to build and hook it as much as possible. But if I have to use an external Editor (Visual Studio C# or VB. Net ...) I'm willing to follow the instruction.
I searched all over the web but couldn't find a way to do this. I definitely appreciate your kind assistance on this.
Thanks for your help, I'm open to any suggestion!
If I am not mistaken, you are trying to create a custom task pane for Excel (add-in). If so, then this link might help you, but you need to build it with Visual studio using Office development tools:
https://learn.microsoft.com/en-us/visualstudio/vsto/custom-task-panes?view=vs-2019

Roku SceneGraph with Search Functionality

I'm creating a Roku app in SceneGraph and trying to near duplicate the search functionality I had using the old SDK. I'm stuck at only being able to display the mini keyboard. I'm trying to add buttons via buttongroup (i.e., Search, Cancel) but having two issues:
Not sure how to get the text string that's typed into the mini keyboard and store that in a variable or field so I can perform the search on it.
How to create a Search button and give it focus when user is ready to search for the string they entered.
Any help would be appreciated. Thanks.
SGDEX (Scenegraph Developer Extensions) is what you need. They have a view called "SearchView". Look it up.
Also...
RALE (Roku Advanced Layout Editor) has good search options. - I have been unable to find a decent Search sample. It would be cool if we could export the source code from RALE.
However if you haven't tried RALE. You could upload your script, then add search to it.

Disable copy function in PDFTRON for Android

Is it possible to disable the copy option of the lib when selecting a text in the PDF using the PDFTron lib for Android?
I tried to search for the string, but also have not found it.
If you are using one of the mobile SDK's, or using our PDFViewWPF control for .Net 4+, then this is possible by modifying the tools code that is provided. There will one or two text selection tools, for which you can just comment out. Plus you would want to disable ctrl-c, and right click and select copy abilities. Exact code changes depends on platform. If you are using our older C++ PDFViewCtrl class this is harder to do, but I suspect you are not on this anyway.
Be aware though, there is no real way to prevent a user from extracting text from a PDF, since they can always open it in another PDF viewer and do it there.
See this form post for more info, including how to scramble the unicode values of text.
https://groups.google.com/forum/#!searchin/pdfnet-sdk/disable$20text/pdfnet-sdk/luWQmyhRDTw/z7UIGuu9uYkJ
Note, you will probably be interested in the PDFTron WebViewer technology, which provides much greater control over content. In particular, the original PDF file is never exposed to anyone for download. You can also encrypt the XOD file, so it cannot be opened in an XPS viewer, and you have full control over the UI, including disabling text search/extraction.
https://www.pdftron.com/webviewer/showcase/
https://www.pdftron.com/webviewer/index.html

Inserting a PDF file as a resource, and displaying the pages?

I am using Visual C++, MFC, and would like to:
(a) Load a pdf file as a resource
(b) Display this file, and be able to move through the pdf file.
The reason why I would like to load the pdf as a resource, is that I do not want the User to be able to download the pdf file (at least not easily).
Can someone please help me?
All the best
Alex
You don't need to use ActiveX to accomplish what you want. Adding a custom binary resource to the resource file should be sufficient. This had been asked here and here.
As far as I know there are a couple of PDF OCX/ActiveX controls that allow you to view PDF files.
From Adobe itself there is an ActiveX COM Control. You should be able to add it into your toolbox and to drag it on a MFC dialog.
Also I found an older article on CodeProject

SharePoint Designer: how do I disable auto insertion of image size attributes?

I'm hand-editing HTML files in a plain text editor (vim) via SharePoint Designer. Problem is, as soon as I save the files, SharePoint automatically adds width and height attributes to all the img-tags.
Anyone know if it's possible to disable this "feature"?
I don't want it to mess around with my code. Yeah, shouldn't be using SharePoint Designer then, I know - problem is that's not an option.
Sorry, that's a bug and as far as I know there's nothing you can do about it. The only way I found around it is by actually packaging up the (.aspx) files in a wsp solution, deploying them ready made to the site collection.
For regular Html editing, SP designer sucks balls.

Resources