Questions tagged [fixeddocument]

70 questions
0
votes
3 answers

FixedDocument page size

I am pulling an image from the web and adding it to a FixedDocument page. The image that I am pulling has dimension size of 1200px X 1500px. However in the FixedDocument the image appears as a small thumbnail (please see the screen grab). Given…
Anand Shah
  • 14,575
  • 16
  • 72
  • 110
0
votes
1 answer

What can cause XPS FixedDocument to look different on Windows 7 compared to XP?

I have a program that generates a FixedDocument object and displays that in the XPS DocumentViewer. According to the documentation on MSDN "Fixed documents are intended for applications that require a precise "what you see is what you get" (WYSIWYG)…
0
votes
1 answer

BitmapSource to UI Element for FixedDocument?

I have the following in a WPF application: Create a stackpanel Create a bitmapsource from the stackpanel Create a FixedDocument So, I'm trying to get from step 2 to step 3. FixedDocuments only accept UIElement objects for Children.Add. Is there a…
Unknown Coder
  • 6,625
  • 20
  • 79
  • 129
0
votes
1 answer

DocumentPage not getting the images from the fixed XPS document page

I have this code Private Sub SaveFixDoc(ByVal fd As FixedDocument, name As String) Dim filename As String = My.Settings.Path2Labels & "\" & name & ".xps" Try Dim xpsd As XpsDocument = New XpsDocument(filename,…
0
votes
1 answer

How to print several images per page

I have generated several images at the runtime and I need to print them. Those are barcodes so the height can be fixed but the number is not know beforehand so more pages might be necessary. Let's say for example that a maximum of 4 images can fit…
Luca
  • 918
  • 2
  • 13
  • 30
0
votes
1 answer

How to set text alignment in dynamically created FixedDocument

I am creating a report through FixedDocument and I am doing it in the code behind to dynamically add data to the report. I started using FixedDocument today and got stuck in aligning texts. It does not seem to center align. Here's my code: using…
ThEpRoGrAmMiNgNoOb
  • 1,256
  • 3
  • 23
  • 46
0
votes
2 answers

WPF PrintPreview Get the PageContent of DocumentPaginator Pages

I want to write my own PrintPreview for larger text using a DocumentViewer to display it later. I have not found anything usefully for my problem. At the moment I'm searching for a way to get the content of the individual pages. I found a way to…
0
votes
0 answers

WPF FixedDocument Overflow

I have written the following code to create a fixed document. On the page I add a stack panel. The stack panel contains some textblocks and a grid. The grid is supposed to have three columns: 10%, 45% and 45%. However the Grid goes off the page but…
Ross Kelly
  • 477
  • 1
  • 6
  • 23
0
votes
2 answers

Previewing FixedDocument in DocumentViewer looks ok, printing it always prints the first page

I'm creating a FixedDocument by adding FixedPages to PageContents, then adding them to the FixedDocument somehow like this FixedDocument fd = new FixedDocument(); // add FixedPages in PageContent to fd Printing them with a PrintDialog, like…
Kevin Suppan
  • 232
  • 2
  • 18
0
votes
0 answers

Pdfsharp lost visual brush in background of label

My WPF app has a label, the background is visual brush, the brush contains a text"-" ; I use pdfsharp to convert fixeddocument to pdf, but strange things happen, some texts are lost, some are at wrong positions; in my WPF app every label has "-" at…
wwsinsh
  • 30
  • 3
0
votes
1 answer

WPF - How do I remove page from FixedDocument?

I have a simple class called "MyPage": public class MyPage { public TextBlock tbParagraph; public FixedPage page; public PageContent content; public MyPage(string Text) { tbParagraph = new TextBlock(); page = new…
John Doe
  • 117
  • 9
0
votes
1 answer

Detect if content on FixedPage exceeds bottom boundary

I'm creating a document I'd like to print later. This document shall contain a grid that lists items like a table, including a header row. The number of items varies and therefore it is possible that the grid exceeds the bottom boundary of a single…
0
votes
1 answer

How to remove FixedPage from FixedDocument?

I am using a DocumentViewer to display a FixedDocument to the user before allowing the user to print or save the document. I have edited the DocumentViewer panel to have a checkbox that allows the user to select if they want a chart in the document…
MisterMystery
  • 402
  • 6
  • 14
0
votes
1 answer

WPF FixedPage with same instance of UserControl

First off, I'm not sure if I phrased the title correctly. There are UserControls which are added via a ViewModel and I find them by searching the VisualTree and add them to a ObservableCollection. What I would like to do is Print each instance…
bruh1234
  • 67
  • 10
0
votes
1 answer

C# XPS FixedDocument fails to save, width and height must be non-negative

I am having a problem with a XAML report that needs to be saved to XPS. Whenever the save is called the XPS Writing failed due to, "Height and Width must be non-negative". When I inspect the object, most heights and widths are set to NaN. I am…
TheAfrican
  • 11
  • 1
  • 1
  • 4