I am using microsoft's 'print to Pdf' option in the print dialog to print a WPF visual as PDF. It works fine if I open the pdf in a browser, but if I open the pdf in something like Adobe Illustrator it does not recognize the fonts, and it substitutes with a default. Is there anything I can do to work around this?
Related
I'm working on an application for Pixelsense using Microsoft surface 2.0 , I wants to open PDF file in my application in scatterview control , so that i can zoom , rotate & move my PDF file . I have followed the process given http://hugeonion.com/2009/04/06/displaying-a-pdf-file-within-a-wpf-application/
In the link i'm able to open PDF file in scatterview but not able to rotate & zoom it
I would suggest conmverting your PDF file to an image or images, then using those. It may be that ScatterView doesnt have all the support for embeded activeX controls etc and has better support for images.
Processing PDF files can be done with GhostScript (open source) or commercial PDF components.
OK, so I have built a Windows Form application. I now want an icon for it. So I use the Icon Editor built into Visual Studio 2012. Draw it all out to look nice and purdy. Once I am done, I have a .ico file and I make it the default icon for the project, and also the icon for the one WinForm in the application.
Unfortunately, it does not show up as I have created it! It is displayed as the default icon file as it existed before I modified it in the icon editor. It's a 32x32 4 bit icon. If I change the extension to .bmp it shows up as the default.
It looks like the VS icon editor is editing something else, not the appearance of the icon. Can someone tell me what I am doing wrong?
I used to have a progam called IconArt that would create icons that looked like icons when I used them in VS. IconArt is now abandonware and won't run on my 64bit Windows workstation.
Since I didn't get any answers within the time I was hoping, I posted this question also in the MSDN Visual Studio forum, and got a good answer that I thought I should post here. Credit to Reed Copsey, Jr, for the answer!
This is it:
You'll need to put your design in all of the different versions. ICO
files contain multiple versions of the same image, for different
screen resolutions.
My personal preference is to not use VS - there's an ICO plugin for
Paint.Net (all free) which allows you to make a single image
(typically 256x256), and save multiple versions within an ICO file in
one shot. It's very useful for building icons.
See
http://forums.getpaint.net/index.php?/topic/927-icon-cursor-and-animated-cursor-format-v37-may-2010/
for the plugin.
Since I am a Paint.Net user, the plugin sounded like a great idea, and I tried it. Bingo! This works very nicely.
Is there any library or tool to convert a pdf file to SilverLight xaml file?
This is what my google-fu got me:
http://www.amazedsaint.com/2009/05/pdf-to-xaml-conversion-alternate.html
From that article:
Create a new Silverlight Project in Expression Blend.
As Expression Blend can import adobe illustrator files, simply rename a pdf file's extension from pdf to ai
Clicked File-> Import Adobe Illustrator files in Blend, and imported to my active window.
You'll get the whole form imported as graphical paths, preserving the whole layout
Download and install the free XAML Export plugin for Adobe Illustrator (CS, CS2, CS3, or CS4).
http://www.mikeswanson.com/XAMLExport/
Rename your .PDF to .AI (for older versions of Illustrator).
Open in Adobe Illustrator.
Choose which page (Illustrator can only open one page of your PDF at a time).
Export to XAML (choose Silverlight over WPF, it produces better results)
Rinse and repeat for other pages.
I need to create silverlight application where customer will see some pdf files.
PDF files have to be inside silverlight control and not rendered as images (customer wants to select text)
For this purposes i need some free libriaries or code to convert pdf file to xaml (or just open pdf so i can convert it to xaml).
Which library can read pdf and help me to convert data to xaml?
Can I read somehow pdf file and write custom convertation tool?
I saw iTextSharp. Is this library can read pdf and help me with my issue?
I will be thankfull for any ideas or links.
I make use of the Acrobat Reader plugin to do the displaying for me. It does require a different method depending on whether your application is running inside or outside the browser (I check if the application is running inside the browser and change the means of display accordingly). If running inside the browser, I overlay the application with an IFrame, as I describe in this article: http://www.silverlightshow.net/items/Building-a-Silverlight-Line-Of-Business-Application-Part-6.aspx. Otherwise, I use the WebBrowser control. I have a control which does this all for you in the source code that accompanies my book, which is downloadable from the Apress website here: http://www.apress.com/9781430272076/.
Hope this helps...
Chris
When I use WPF WebBrowser's NavigateToString method to display UTF8 html (with hebrew text in it) it's displayed perfectly.
However, when I try to use the NavigateToString to display html with hebrew text in it in a non-utf8 encoding (CodePage 1255 to be exact) the hebrew is messed up.
I checked the cp1255 string in Visual Studio's debugger and it looks great, and also when I save the source of the web browser's contents and open it with an external browser it looks great.
If I use the NavigateToStream method instead of the NavigateToString method it works great.
What's the problem with the NavigateToString? am I doing something wrong?
NavigateToString= NavigateToStream + UTF8NoBOM
Use NavigateToStream and make sure you have the correct encoding in the stream data.