converter

Convert PDF to anything which can be opened by Word

こ雲淡風輕ζ 提交于 2019-12-03 22:28:33
问题 Want to do it via C#, all inline, no Process.Start()...and free...could be RTF, HTML, whatever the case may be...as long as I can open in Word, which I can then save off as RTF, which I can then load within a RichTextBox. I'm aware similar questions have flooded this forum over the years, nothing that seems to address what I am asking though. EDIT: Looks like it can be done here: http://www.itextpdf.com/examples/iia.php?id=275 回答1: Use a PDF library, such as iTextSharp to parse the PDF. You

Primefaces autocomplete with POJO and String value [duplicate]

ぐ巨炮叔叔 提交于 2019-12-03 22:20:12
This question already has answers here : Closed 3 years ago . p:autoComplete itemLabel throws “The class 'java.lang.String' does not have the property 'label'.” (5 answers) I need to have an autocomplete with string value, because users can't be restricted to provided items by autocomplete method, but they should be able to write anything in the search field. If they want, they can choose from suggestions as well. Now I am always getting /archive/overview.xhtml @28,57 itemLabel="#{item.name}": The class 'java.lang.String' does not have the property 'name'. XHTML: <p:autoComplete id="vyraz"

extract audio to mp3 from mp4 using c++ (not executing ffmpeg with args)

大憨熊 提交于 2019-12-03 20:43:48
how can i programmatically convert ( extract the audio channel ) from mp4 video file format ? i just can't find any thing in the web , for using c++ . i what to dynamically link external engine that i can via c++ take mp4 file and convert it to mp3 file. and not passing command line args to LAME or MPLAYER or FFMPEG ? You can try using ffmpeg to do it in c or c++. Here is the normal flow of steps. Init ffmpeg using av_register_all(); Open input file using avformat_open_input( &informat, sourcefile, 0, 0)). Find stream info using avformat_find_stream_info(informat, 0)). Find the audio stream by

JSF 2.0 - selectOneMenu defaults to 0 when empty

蓝咒 提交于 2019-12-03 20:33:54
For my project i want to implement a combobox with h:selectOneMenu . I read many posts about how to handle the selectOneMenu properly and how to implement a custom converter. The combobox shall store the ID ( Long ) from a different DB Table (named fk_ID) for which a constrain is in place. So far everything seems to function as planned. Now to my problem: The column fk_ID is optional, so the first option in the combobox is a f:selectItem with no value labeled "choose ...". When I save the form and change the value everything is OK, except if I set it back to "choose ...". The error I get is a

Convertor on ImageSource - convert image to grayscale

你离开我真会死。 提交于 2019-12-03 20:27:35
问题 I have multibinding on Image control. I bind two properties one is type of bool(IsLogged) and one is typeof Uri (ProfilePhoto). XAML: <Image.Source > <MultiBinding Converter="{StaticResource avatarConverter}"> <Binding Path="ProfilePhoto"></Binding> <Binding Path="StatusInfo.IsLogged"></Binding> </MultiBinding> </Image.Source> </Image> I create converter, which convert BitmapImage to gray scale if property IsLogged is false. It look like this: public class AvatarConverter :

Naudio - Convert 32 bit wav to 16 bit wav

末鹿安然 提交于 2019-12-03 17:06:25
I've been trying to convert a 32 bit stereo wav to 16 bit mono wav. I use naudio to capture the sound I and thought that using just the two of four more significant bytes will work. Here is the DataAvailable implementation: void _waveIn_DataAvailable(object sender, WaveInEventArgs e) { byte[] newArray = new byte[e.BytesRecorded / 2]; short two; for (int i = 0, j = 0; i < e.BytesRecorded; i = i + 4, j = j + 2) { two = (short)BitConverter.ToInt16(e.Buffer, i + 2); newArray[j] = (byte)(two & 0xFF); newArray[j + 1] = (byte)((two >> 8) & 0xFF); } //do something with the new array: } Any help would

PDF to bmp Images (12 pages = 12 images)

十年热恋 提交于 2019-12-03 16:35:55
I have to deconstruct/extract a pdf page by page into bitmap images . This will be done on a server via a web service which I've setup. How do I get this right? It has to be page by page (1 page per image). I am really stuck and I know one of you geniuses have the answer that I've been looking for. I have tried: http://www.pdfsharp.net/wiki/ExportImages-sample.ashx Which didn't work correctly. I am using C#; The PDF is not password protected; If this solution could take a Uri as a parameter for the location of the PDF it would be excellent! The solution should not be reliant on Acrobat PDF

converting binary to utf-8 in python

◇◆丶佛笑我妖孽 提交于 2019-12-03 16:10:56
I have a binary like this: 1101100110000110110110011000001011011000101001111101100010101000 and I want to convert it to utf-8. how can I do this in python? Cleaner version: >>> test_string = '1101100110000110110110011000001011011000101001111101100010101000' >>> print ('%x' % int(test_string, 2)).decode('hex').decode('utf-8') نقاب Inverse (from @Robᵩ's comment): >>> '{:b}'.format(int(u'نقاب'.encode('utf-8').encode('hex'), 16)) 1: '1101100110000110110110011000001011011000101001111101100010101000' Well, the idea I have is: 1. Split the string into octets 2. Convert the octet to hexadecimal using

Convert a Regular Date to Julian Date and vice versa in Java

痴心易碎 提交于 2019-12-03 15:07:52
I've written a simple code that converts a regular date to Julian date. Here's the code for those who need the same conversion: public int convertToJulian(String unformattedDate) { /*Unformatted Date: ddmmyyyy*/ int resultJulian = 0; if(unformattedDate.length() > 0) { /*Days of month*/ int[] monthValues = {31,28,31,30,31,30,31,31,30,31,30,31}; String dayS, monthS, yearS; dayS = unformattedDate.substring(0,2); monthS = unformattedDate.substring(3, 5); yearS = unformattedDate.substring(6, 10); /*Convert to Integer*/ int day = Integer.valueOf(dayS); int month = Integer.valueOf(monthS); int year =

Is there a C++11 to C++03 converter? [closed]

為{幸葍}努か 提交于 2019-12-03 13:38:26
Is there such a tool that is able to convert a code that uses some C++11 features to C++03 compatible code (perhaps using some third party libraries like Boost)? Because nobody has answered with an actual answer, the answer is "No". Just upgrade your toolchain. There are a lot of good reasons to do that anyway. For Ubuntu and other Linux variants, you can even download the package in source form and compile it for your ancient system if you want to use a new toolchain on a very old system. Of course, if you then ship programs with this you will have to link libstdc++ statically or ship the