473,625 Members | 3,318 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PrintDocument and Forcing New Page

Situation...
I have:
1) An XML Document that defines print formating and print content eg text,
db data,image etc.
2) Lines of code (vb.Net) that parse the XMl Doc using an XMLTextReader and
produces a piece of paper that falls out of a printer based on the XMlDoc...

All working OK for single page document.

Problem...
What if the XMl doc has more content then can fit on a single page.

Yep... I can track the Y pos and say.. Hey! I have reached a certain
boundry...
But how do I then force a 'page break' and continue parsing the XML Doc....??

Generally if I'm using an IO text stream I'd use 'e.hasmorepages ' but this
is a different scenario.

Any Help Appreciated...
Jul 21 '05 #1
0 3336

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1195
by: Frnak McKenney | last post by:
Evert: verb. Turn inside out; turn the inner surface of outward. The project I'm working on involves seven or eight reports. They vary from simple ("print this field here, that there, with a header and footer") to more complex ("put field A on the left unless FieldB is nonzero, in which case add it to a bucket and print it at the end of the report"). Writing the code to put the data onto a GDI(+) "page" isn't too bad... or it...
3
12370
by: Randy | last post by:
Hello, I'm trying to print a dataGrid using PrintDocument control. My datagrid has about 23 columns so it is fairly wide. When I use the PrintControl, it prints only the part of the dataGrid that is visible on screen. I tried using PrintPreviewDialog too but it still only shows just what is visible in the dialog that houses the dataGrid. I want to get all the datagrid printed. Maybe wrapping it would be the only way to print all of...
1
2155
by: john sutor | last post by:
I am trying to print a simple document (.txt) from my drive. I tried using the following code to no avail. This cannot be that hard. In VB this was easy, Why does C# make it so hard? Can anyone help me solve this. I ran the code from the clikc event of a button PrintDocument prnDc = new PrintDocument(); prnDc.DocumentName="c:\\Test1.txt"; prnDc.Print();
0
896
by: KeithO | last post by:
Situation... I have: 1) An XML Document that defines print formating and print content eg text, db data,image etc. 2) Lines of code (vb.Net) that parse the XMl Doc using an XMLTextReader and produces a piece of paper that falls out of a printer based on the XMlDoc... All working OK for single page document. Problem...
0
893
by: dgk | last post by:
It seems really odd that the graphics object in PrintDocument doesn't have any way to return the current X and Y location. I realize that I can use MeasureString to calculate where X should be after using a DrawString and I think that I can use GetHeight to figure out where I am with Y, but this really seems awful and I must be missing something. Essentially it means that I need to test everything that I write for both height and width and...
2
6618
by: bp | last post by:
Hi, I try to use my own PreviewDialog with a PrinPreviewControl, to preview a document of type MyPrintDocument, and I want to implement the PrintRange functionnality (print some pages between 2 values). I noticed that we can specified the PrintRange, FromPage and ToPage properties of the PrintDocument.PrintSettings object, but, as said in MSDN : "The FromPage, ToPage and PrintRange can also be set programmatically,
1
11176
by: kig25 | last post by:
Hello, When using the VB.NET PrintDocument class, I seem to be encountering an issue where the sub pd_PrintPage handles PrintDocument.PrintPage (upon continuing if HasMorePages = true) will paint the next page on top of the original page. In a sample data case where the source is long enough to fill three pages, I end up with four calls to pd_PrintPage which render onto two printed sheets. Historical posts in this forum from 2003 and...
1
2599
by: Dave Cullen | last post by:
How do I force a new page when printing with PrintDocument? I put a vbFormFeed in there after my footer and it gets ignored. Thanks Dave
7
11395
by: pamela fluente | last post by:
hi, What is the cleanest and effective way to use the PrintDocument object to print directly to a pdf file "myfile.pdf" (with no prompt to the user: just print to file and make pdf) ? Does anyone have a simple code snippet? Either VB or C# will be perfect.
0
8256
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.