Embedding SVG edit as a inline editor - edit

How can this be accomplished in a HTML page:
Click on the SVG image will open SVG editor in another window. On closing the window (after Y/N prompt) the svg code in the opener window will be updated.

Well I found a solution: having opened the editor with
hWinEdit=window.open('svg-edit-2.7/svg-editor.html','SVG-edit');
I then add the onbeforeunload event:
hWinEdit.onbeforeunload=function(){hWinEdit.opener.svgClose();};
where svgClose is my function getting the SVG HTML string:
s=hWinEdit.svgCanvas.getSvgString();
Anyway I think I have to abandon SVG-Edit as there are too many critical bugs for my purpose. (Connectors not working, hangups etc)

Related

How to click element via Shadow DOM using VBA?

Having opened this link in Chrome, I get to the PDF file that opens in Chrome.
On this page there are buttons for downloading, printing, etc:
When viewing the page code, it does not display any information on the download and print buttons.
When I do view the code by hovering the mouse over the download icon, the code for this button opens, which is not available through a regular DOM.
As I understand it, you can use Shadow DOM here.
How do I access the download button and click it to the VBA?
You could access the pdf by HTTP Request and save the data that way. The data is coming from the web, so it's going to be from a Request. You dont need chrome automated with VBA to do this action. Also Webdriver has good support: Downloading pdf file using WebRequests
idk if selenium has it, but i would search more if i were you and not use the DOM to download PDF by clicking elements.

docbook webhelp part toc blocked by possibly a div block

When generating webhelp from ant script the toc for part element is blocked by a box. This box appears to be connected with toc in left pane. When toc pane is resized the box in main window also resizes. Anyone experience this and know how to fix. Using sample build.xml and properties file in docbook webhelp folder with no special customizing.
I switched to another jquery ui theme instead of the default redmond theme and commented out the embedded style section in webhelp-common.xsl file. Solved the problem. Didn't track down cause of default theme.

Print CSS with pdf included in page

I have a page where I have a lot of info about an item, with a little "Download specs pdf" button below. Clicking it opens the pdf seperately, which is all I need for the webversion.
However I'm currently working on my print css, and my goal is to create a print css here that shows the info along with the pdf below it, included in the same printfile.
Is it possible to embed the pdf in my page (only for print css)? I've tried using the <object> or embed tags but this doesn't seem to show up at all in my print css.
Update: I managed to show the pdf using iframe, but I'm unable to set the iframe height to the pdf's height. The pdf is dynamic so it's not a set height. Dynamically updating the height through jQuery has proven to be impossible because the onload event isn't fired for file downloads in an iframe. If anyone can help me come to a solution, I would be very grateful.
Thanks in advance.
The simple solution is to force a 4:3 perspective on the iframe and size it according to your print page (A4 paper size is standard here).
You can use PDF.js library's who is an amaZing JavaScript PDF viewer working cross browser. Display the PDF in a div, make it hidden with a display:none for web version with your screen CSS.
One advice I can give you is, if you know the maximum number of PDF pages, just make the iframe height large enough... that means, if the number of pages is less, the printer is going to output empty pages.
The other advice was the one stated above, get a tool to annotate or change properties of all PDFs to contain that information.
I found this tool: http://pdfcrowd.com/html-to-pdf-api/ to convert PDF into HTML, which you can use instead of displaying PDF
I'm thinking your best bet is to have a parsed version of the PDF for printing. Open it in Illustrator and save each page to SVG and use the SVG files to print with.

Is it possible to have a hyperlink open in a new tab that is inside a pdf that is inside of a frame in classic asp?

I Have a classic asp site i am working on. The page has two frames one directly below the other. A Customer has to be able to view a pdf to continue onto the next page. To get to the next page they have to click on a hyper link inside of the pdf that is being viewed. If they cannot see the pdf then they have to download adobe reader which i have included a link to in the top frame.(The top frame has some text and the link) now the bottom frame(contains the pdf) this works fine except when i click the link that is in the pdf the page then opens in that same bottom frame that contained the pdf. It needs to be target _blank. Or whatever you would call it to basically either over ride the two frames and just open in the browser or open in a new tab or window which i cant get either to do. This problem is in IE and Firefox but in chrome it over rides the two frames and opens correctly. Is there any way to get this to occur in IE and Firefox?
I've found this resource about your issue:
http://forums.adobe.com/thread/853394
They say there's no target attribute to set. But they think (and i also think) that if you place a :
javascript:window.open('http://yoururl.com');
it should work, always if you can accept the security alert message (Abobe PDF is trying to execute a script... blah blah)
If your continue reading carefully it seems they solved the problem using Adobe scripting inside inDesign
Hope this helps...

Force Open/Save dialog for inline PDF?

I'm wondering if it is possible to force an Open/Save dialog for an inline PDF?
I have a link that opens a new window with an inline PDF in it. I was able to prompt the dialog by changing registry settings, but only if I changed my preferences in Adobe Reader (Internet > uncheck 'Display PDF in Browser'). So basically if the PDF is opening in Reader I can get a dialog.. but is this possible for inline PDFs? Thanks everyone.
You need to change "Content-disposition" attribute of the header of your http respose accordingly.
This answer in SO tells you how to do it in C#
This one tells you how to do it in PHP
This one in Java