|
here is the example, I mean the real problem: I have two documents: xml file and pdf file. From the xml file, I am creating an html table populated with the requested informations at a webBrowser control within my app. The pdf file is a file what is related with the data in the xml file and is used just for previewing a document with some items from the catalogue. Right now the user can preview the html table at one webBrowser and preview the pdf document at another webBrowser control. I want to merge them and put them in one single pdf document, instead of using two webBrowsers and more button pressing for a same action. Is that possible? Thx for the cooperation
|
|
|
|
|
Although as leppie says, you won't be able to actually modify the PDF document unless you use a tool to do that, my thought was that you could still host the table and PDF document in the same web browser, by generating the code for the web page to include the table and the embedded PDF (on the same page). I don't know if this would look good or not, but it might allow you to get rid of the other web browser.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
can you give me some idea (example) how I can try to do that and see how it looks a like? Thx ahead
|
|
|
|
|
Well you mentioned you were generating the html for the one web browser manually, so I'll assume you know how to do that. All you need to do now is add an embedded pdf document to that page, and set its url to the pdf document you want to show. Any time either the table (xml) or the pdf document changes, you'll still have to update the web browser's generated html, but at least this way it'll all be in one place, as you want:
src ="path/to/myPdf.pdf"
width="100%">
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
thx....this can help me with my issue, but I am done for today, I will continue working tomorrow. Thanks a lot and have a nice evening(day) bye
|
|
|
|
|
You're welcome.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
Hi,
I'm having problems with drag and drop of a cell value (copy) within one datagridview.
Please help.
|
|
|
|
|
Member 3031965 wrote: I'm having problems with drag and drop of a cell value (copy) within one datagridview
..and I'm having trouble understanding what your problem is as I appear to have left my psychic head at home today.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Dear All Hi,I am new to csharp, I want to create a Bar Graph without using the graphics class, I want to use a button and adjust its size so that it looks like a bar.I will populate the properties of the buttons (size,color,position) at the run time.
I need to create button instances at run time, I tried creating user objects of the button, but still I am unable to create many buttons at runtime.
Any help or ideas will be appreciated .
Thanks
|
|
|
|
|
Button b = new Button()
b.XXX = YYY;
this.Controls.Add(b);
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi Greeg,
If I had to create 100 buttons ,I do not want to write this code 100 times. I want something which is like cloning or creating Instances, for a user object button.Its not clear to me how we can do it in csharp.
|
|
|
|
|
Buy a book
int left = 0;
int space = 1; //pix
for ( int i = 0 ; i < nbButtons ; i++)
{
Button b = new Button();
b.name = i.ToString();
b.Text = i.ToString();
b.Left = left;
c.Controls.Add (b); //C is a user control
left += b.Left + b.Width + space;
}
|
|
|
|
|
Thanks Lisan
I'll get some good books but until then this works.
int left = 0;
int space = 1; //pix
int nbButtons = 5;
for (int i = 0; i < nbButtons; i++)
{
GlassButton gb = new GlassButton();
gb.Name = i.ToString();
gb.Text = i.ToString();
gb.Left = left;
gb.Location = new Point(20 + (i*5) , 10 + (i *5) );
this.Controls.Add(gb); //gb is a user control
left += gb.Left + gb.Width + space;
}
Thanks again
|
|
|
|
|
Hi.
I have a text input like this:
a: a-related text
b: b-related text
c: c-related text
d: d-related text
e: e-related text
f: f-related text
and a expression like this:
(a\:\s*)(?<a>.*)(\r\n)(b\:\s*)(?.*)(\r\n)(c\:\s*)(?<c>.*)(\r\n)(d\:\s*)(?<d>.*)(\r\n)(e\:\s*)(?<e>.*)(\r\n)(f\:\s*)(?<f>.*)(\r\n)
</f></e></d></c></a>
So far so good.
The problem is that I never know how many of the lines a-f which is present.
The text might look like this:
a: a-related text
c: c-related text
f: f-related text
or:
a: a-related text
b: b-related text
some strange text
f: f-related text
Any suggestion on how to write my expression?
Kjetil
|
|
|
|
|
|
Don't write a pattern for matching each separate line, write a pattern that matches any of the lines that you want:
(?:^|\r\n)([a-f]):\s*(.+?)(?:$|\r\n)
This should give you a match for each line, containing the a-f character and the related text as captures.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Beautiful expression.
But how do I name my groups?
Kjetil
|
|
|
|
|
Without naming the groups, you can access them by index.
You can name them like this:
(?:^|\r\n)(?<section>[a-f]):\s*(?<description>.+?)(?:$|\r\n)
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi.
I really appreciate your help, but I still need some help.
RegExp is not my strongest side
I need to rephrase my question.
My text input is more like:
(I'm not allowed to use actual data from my project)
Breakfast: Sliced Bread
Lunch: At McDonald's
Dinner: Chicken
Supper: Mexican
and my task is to isolate what a person ate and save that info in my database.
Different person might have different ways to report their meals. Each person has a consistent way though. There are ~150 persons and they all skip meals from time to time.
Can you still help me ?
Kjetil
|
|
|
|
|
Instead of ([a-f]) in the pattern to match a single character, use (Breakfast|Lunch|Dinner|Supper) to match the strings.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi.
It still does not work.
New problem:
The user input is like this
Breakfast: Sliced Bread
Lunch: At McDonald's
(had some coffee and snack)
Dinner: Chicken
Supper: Mexican
and my match.Groups[0].Value is
Breakfast: Sliced Bread
Lunch: At McDonald's
instead of
Breakfast: Sliced Bread
Lunch: At McDonald's
Dinner: Chicken
Supper: Mexican
Why?
This is starting to be embarrassing
Kjetil
|
|
|
|
|
No, that is not correct. If you check your result again, you will see that you are getting the breakfast and the dinner. That is because the pattern is consuming the line break before and after each match, so the next line won't match.
Change the part of the pattern that matches the end of the line or end of the string from (?:$|\r\n) to (?=$|\r\n) to make a zero-width positive lookahead.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello Experts:
I want to open a Project developed in VS 2008 with 2.0 Framework. How can I open this complete project in C sharp Express Edition 2005. I can only be able to open .cs extension file but not the complete project.
While I am trying to open .csproj file I receive the following error message.
Unable to read the project file xyz.csproj.
thanks
|
|
|
|
|
In the .SLN file:
It looks like this for VS 2008:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Change it to:
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Now you can load the solution. I have does this in the past and it works without issues.
|
|
|
|
|
Dear Expert:
I have tried your method but it does not work so finally I have created a new project in Express Addition and add .cs files into it and it works fine.
thanks for your quick responcce...HIghly appreciated.
|
|
|
|