|
To do this, you need an API to read PDF and an API to create Flash movies.
Do you want proper semantic conversion (i.e. text is still text, selectable/scalable/etc in Flash)?
For creating Flash documents, can you install things on your server? The (free) Flex libraries include compilers that you can use to create a .swf, but I think it is a Process.Start command line interface, not an integrated .Net API.
Are there any restrictions on the PDF? (e.g. non encrypted or only text or no compression etc).
The drawing primitives of Flash and PDF are quite similar, so a translation should not be too hard, if you can get down to the PDF drawing stream for each page. In an unencrypted PDF that is fairly easy.
|
|
|
|
|
Hi experts,
this actually is not a C# specific question but related to Visual Studio. I posted it here because the mentioned application is written in C# and there seems to be no IDE related forum.
If there is, and I just didn't see it, please move this appropriately.
My solution contains an actual project, a setup project and a setup customization project.
Most of the time I have changed something, I simply hit F6 to compile or F5 to debug. Since the setup project takes a lot longer to compile than the rest, it is left out of this "normal" compilation (Its checkbox in configurations editor is not checked).
Whenever I have solved a bunch of problems and want to compile the whole thing, I have to manually open configurations manager, check the "Build" checkbox for setup, close configurations manager, change to release, build, change back to debug, build, open configurations manager again, uncheck "Build" for setup and close configurations manager.
I tried to record this as a macro. Here is the record
Sub TemporaryMacro()
DTE.ExecuteCommand ("Build.ConfigurationManager")
DTE.ExecuteCommand ("Build.SolutionConfigurations", "Release")
DTE.ExecuteCommand ("Build.RebuildSolution")
DTE.ExecuteCommand ("Build.SolutionConfigurations", "Debug")
DTE.ExecuteCommand ("Build.RebuildSolution")
DTE.ExecuteCommand ("Build.ConfigurationManager")
End Sub
Instead of doing what I described above, it opens the configurations manager, waits for user to close it, builds, changes to release and gives an error message that calling a COM component resulted in HRESULT E_FAIL.
Obviously, this approach doesn't work as expected. How would I have to change the macro to fit my needs?
(Actually, I don't want to open configurations manager. I just want to in/exclude the setup project in/from the build process. And this is the only way I know to do it.)
Edit: Since I chose an inappropriate forum, please don't exceed this thread. Answer here[^] instead.
Ciao,
luker
modified on Tuesday, August 23, 2011 10:05 AM
|
|
|
|
|
lukeer wrote: there seems to be no IDE related forum.
It's the one down on the left titled "Visual Studio".
You do not need to do it this way, you can build any individual project separate from the others for test purposes, and only build your complete solution when you want to. Check the settings on the toolbar and Build menu item.
|
|
|
|
|
Thanks a lot. I totally missed the side menu (am looking at the dropdown usually).
I will try in the correct forum.
Ciao,
luker
|
|
|
|
|
waiting for the reply
plz send to my mail id
lokesh.ibm.prof@gmail.com
|
|
|
|
|
I suggest a good book. I also suggest you remove your email address before you are spammed from hell.
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....
|
|
|
|
|
If you need to start at that basic a level, then I strongly suggest that you find a book, or course that handles the whole of C# in a structured manner, and follow it - doing the exercises as you go. Just trying to find a tutorial on the "bits that you need right now" is a recipe for not understanding enough about what you are doing, and missing important concepts.
I would also back up the comment about your email address: edit your question and remove it - never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
you should download Sams visual c # 24 hour learning Ebook,from Torrentz.com...it will help you...because i am using this book to study c #
|
|
|
|
|
nidobeb wrote: you should download Sams visual c # 24 hour learning Ebook,from Torrentz.com... Or you could buy it or borrow it from your local library.
/ravi
|
|
|
|
|
you should download buy Sams visual c # 24 hour learning Ebook,from Torrentz.com a reputable source ...it will help you...because i am using this book to study c #.
|
|
|
|
|
Voted to remove for poster's own good ... putting an email in a post is dumb. And yes, buy a book. This is not a site of free teaching staff.
|
|
|
|
|
|
Seconded. It should be compulsory reading for all .NET developers.
Regards,
Rob Philpott.
|
|
|
|
|
|
Book, school, or google. Take your pick.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.OleDb;
namespace new_form_app
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{ }
}
protected void previewButt_Click(object sender, EventArgs e)
{
}
protected void submitButt_Click(object sender, EventArgs e)
{
string M1 = TextBox1.Text;//nak ambil data dari textbox
string M2 = TextBox2.Text;
string M3 = TextBox3.Text;
string M4 = TextBox4.Text;
string strsql = String.Format("insert into NewForm values('{0}','{1}','{2}','{3}')", M1, M2, M3, M4);//ambil value dalam variable M1,M2,M3,M$ dan diberi kepada {0},{1},{2}
//,{4}
OleDbCommand dbComm;//register kepada oledbcommand
OleDbConnection dbConn = new OleDbConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);//intiallize
dbComm = new OleDbCommand(strsql, dbConn);//initialize utk dbcomm
dbConn.Open();//open conn
dbComm.ExecuteScalar();//execute sql command
dbConn.Close();//close conn
Response.Write("Successfull");
}
protected void clearButt_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
}
}
}
|
|
|
|
|
|
how want to preview my web application
|
|
|
|
|
First edit your post to properly format your code snippet.
Second, edit you post to actually ask a question.
You will find the responses you receive are related to the effort you put into the post and how well you comply with the guidelines here.
I know the language. I've read a book. - _Madmatt
"The OP herself was not sure about her question"
"The OP is from India and I know what she meant." - Shameel
|
|
|
|
|
To start, try giving the subject heading of your post something meaningful. Just the fact that your posting a question would suggest you are looking for help.
Here is a list:
You have unused using statements, they should be removed.
Don't use underscore _ in namespaces. Try something like Daniel.NewFormApp
Don't start class names with underscores, start with a capital letter.
Code isn't formatted, when posting at CP enter code inside "code block" tags
Don't leave empty methods in your code, previewButt_Click
Give variables meaningful names like NameTextBox, not TextBox1
Pascal/camel case variables strSgl not strsql
Don't use "" as you are creating strings in memory for no reason, use string.Empty
clearButt and submitButt are probably not a good choice of naming, try something like ClearButton
And actually asking a question will help, we're not all engineers.
Other than that, it looks good
"You get that on the big jobs."
|
|
|
|
|
RobCroll wrote:
And actually asking a question will help, we're not all engineers mind readers.
FTFY
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
This method return "StackOverflowException" error for some inputs;like 12.
where is Infinite loop point?
public void cycle(int f){
int i, j;
if (f == 0)
return;
else
{
for (i = f; i >= 0; i--)
{
for (j = 0; j <= 10; j++)
{
if (i == Math.Pow(2, j))
{
f = f - (int)Math.Pow(2, j);
switch (j)
{
case 1:
cbx1.Checked = true;
break;
case 2:
cbx2.Checked = true;
break;
case 3:
cbx3.Checked = true;
break;
case 4:
cbx4.Checked = true;
break;
case 5:
cbx5.Checked = true;
break;
case 6:
cbx6.Checked = true;
break;
case 7:
cbx7.Checked = true;
break;
case 8:
cbx8.Checked = true;
break;
case 9:
cbx9.Checked = true;
break;
case 10:
cbx10.Checked = true;
break;
}
break;
}
}
}
cycle(f);
}
}
|
|
|
|
|
Hi,
1.
at the very bottom of your cycle() method is a call to method cycle(), so when all the i,j combinations make your test
if (i == Math.Pow(2, j))...
fail, your method calls itself with the same input value, clearly ending up in an "infinite loop". This will happen for the majority of f-values, as most numbers simply aren't a power of 2.
2.
I don't know why you would want to call cycle again; it is even unclear to me why you would need two for loops. And if your supported input range is limited (as the presence of a switch construct suggests), you also !! don't need a switch !!
I think the code below would come close to what you want (it also clears some checkboxes, something your code didn't do at all):
void myBinaryCheckboxes1(int f) {
cbx1.Checked= (f & 0x0001)!=0;
cbx2.Checked= (f & 0x0002)!=0;
cbx3.Checked= (f & 0x0004)!=0;
cbx4.Checked= (f & 0x0008)!=0;
cbx5.Checked= (f & 0x0010)!=0;
cbx6.Checked= (f & 0x0020)!=0;
cbx7.Checked= (f & 0x0040)!=0;
cbx8.Checked= (f & 0x0080)!=0;
cbx9.Checked= (f & 0x0100)!=0;
cbx10.Checked=(f & 0x0200)!=0;
}
BTW: in binary (and in many other situations), things would get numbered starting by zero (so cbx0 up to cbx9).
3.
For the really advanced implementation, you could further simplify if you would have a collection (array, list, whatever) holding those checkboxes; it would suffice to put them in their own GroupBox (nothing else in that GroupBox is easiest). And then have the checkbox tags hold their bit value (the hex numbers in the above code). The final code could then be as simple compact as:
void myBinaryCheckboxes2(int f) {
foreach(Control c in myGroupBox.Controls) {
((CheckBox)c).Checked=(f & (int.Parse((string)f.Tag)!=0;
}
}
BTW: If that looks too weird/convoluted, just stick with the code in myBinaryCheckboxes1() !
[ADDED] Note 1, triggered by lukeer's reply: depending on how the Tag gets assigned, one might not need the int.Parse, one could just assign a numeric tag right away, then use ((CheckBox)c).Checked=(f & (int)f.Tag)!=0; [/ADDED]
Luc Pattyn [My Articles] Nil Volentibus Arduum
modified on Tuesday, August 23, 2011 8:11 AM
|
|
|
|
|
1.you said "your method calls itself with the same input value" but if if statement become true f-values will change;line before switch.
2.I explain this with my sample:12
with input 12 first loop check from 12 till down until 8.At 8 when j become 3 at second loop (second loop prepare all possibilities for 2 power j) at this point if statement will true and run
f = f - (int)Math.Pow(2, j) that turn f to 4 then run
cbx3.Checked = true; in the later round of first loop when i=4 and j=2 , if statement will be true again and will run
f = f - (int)Math.Pow(2, j); that turn f to 0 then run
cbx2.Checked = true;
3.The myBinaryCheckboxes1 is unclear for me specially (f & 0x0001). What means that?
|
|
|
|
|
1. the logic in your code is flawed, it isn't just too complex as I wrote earlier, it also is wrong. The easiest way to make this obvious is this: f is used once, to initialize the for-loop on "i"; modifying f later on has no net result, as f isn't used any more. This cannot possibly be correct.
I added some log statements, writing intermediate values to the console, and it clearly shows f going negative and all output being wrong. Here is what I ran:
using System;
class test {
static void Main() {
cycle(8);
cycle(12);
Console.WriteLine("done");
}
public void cycle(int f){
Console.WriteLine("testing with f="+f);
int i, j;
if (f == 0) return;
for (i = f; i >= 0; i--) {
Console.WriteLine("i="+i);
for (j = 0; j <= 10; j++) {
if (i == Math.Pow(2, j)) {
f = f - (int)Math.Pow(2, j);
Console.WriteLine("found bit "+j+"; f now equals "+f);
break;
}
}
}
}
I suggest you either learn to work with a debugger (such as Visual Studio) using single-stepping, breakpoints, watch variables, and the like. Or add log statements as I did in the above code.
2. 0x0001 is a hexadecimal literal value, and & is the bitwise AND operator. Both should be explained in all their detail in any introductory book on C#. I strongly recommend you get such a book, if you don't yet have one, and start studying the language.
|
|
|
|
|