PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Dec 10, 2018 11:00 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Nov 23, 2018 10:52 am 
Offline

Joined: Fri Nov 23, 2018 10:24 am
Posts: 1
<ContentPage.Content>
<ScrollView x:Name="MainPrint" Orientation="Both">
<StackLayout>
<!--BackgroundColor="#a7afbc"-->
<!--TextColor="#ffffff"-->
<StackLayout Spacing="5">
<StackLayout Orientation="Horizontal" Padding="10,10,10,0">
<Label x:Name="ID" FontSize="Medium" HorizontalOptions="StartAndExpand" />
<Label x:Name="Date" FontSize="Small" VerticalOptions="StartAndExpand" />
</StackLayout>
<StackLayout Orientation="Horizontal" Padding="10,0,10,0">
<Label x:Name="TNumber" HorizontalOptions="StartAndExpand" FontSize="Medium" />
<StackLayout Orientation="Horizontal" HorizontalOptions="EndAndExpand">
<Image Source="rupeeicon.png" />
<Label x:Name="Total" FontSize="Medium" />
</StackLayout>
</StackLayout>
</StackLayout>
<StackLayout VerticalOptions="Fill">
<StackLayout Orientation="Horizontal" Padding="20,5,20,0" VerticalOptions="Fill">
<Label Text="Consgr" FontSize="Medium" HorizontalOptions="CenterAndExpand" TextColor="#2196F3" />
</StackLayout>
<StackLayout>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label x:Name="Cor" Grid.Row="0" Grid.Column="0" FontSize="15" HorizontalOptions="CenterAndExpand" />
<Label x:Name="Con" Grid.Row="0" Grid.Column="1" FontSize="15" HorizontalOptions="CenterAndExpand" />
</Grid>
</StackLayout>
<BoxView BackgroundColor="Silver" HeightRequest="1" HorizontalOptions="FillAndExpand" />
</StackLayout>
<StackLayout VerticalOptions="Fill">
<StackLayout Orientation="Horizontal" Padding="20,5,20,0" VerticalOptions="Fill">
<Label Text="Truer" FontSize="Medium" HorizontalOptions="StartAndExpand" TextColor="#2196F3" />
<Label Text="Triver" FontSize="Medium" HorizontalOptions="EndAndExpand" TextColor="#2196F3" />
</StackLayout>
<StackLayout>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Text="Good Wil)" Grid.Row="0" Grid.Column="0" FontSize="15" HorizontalOptions="CenterAndExpand" />
<Label x:Name="Trver" Grid.Row="0" Grid.Column="1" FontSize="15" HorizontalOptions="CenterAndExpand" />
</Grid>
</StackLayout>
</StackLayout>
<StackLayout Margin="0,10,0,0">
<StackLayout Orientation="Horizontal" VerticalOptions="Center" Padding="30,0,30,0" BackgroundColor="#DED4D4">
<Label Text="items" HorizontalOptions="StartAndExpand" TextColor="#2196F3" />
<Label Text="amount" HorizontalOptions="EndAndExpand" TextColor="#2196F3" />
</StackLayout>
</StackLayout>
<StackLayout>

<ListView pdf:ListRendererDelegate="{StaticResource PdfListViewRendererDelegate}" x:Name="GoodsList" HasUnevenRows="True" SeparatorVisibility="Default">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="10,0,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Text="{Binding Item}" Grid.Row="0" Grid.Column="0" HorizontalOptions="StartAndExpand" />
<Label Text="{Binding Amount}" Grid.Row="0" Grid.Column="1" HorizontalOptions="EndAndExpand" />
<StackLayout Orientation="Horizontal" Grid.Row="1" Grid.Column="0">
<Label Text="{Binding Quantity}" />
<Label Text="x" />
<Label Text="{Binding Rate}" />
</StackLayout>
<Label Text="{Binding Unit}" Grid.Column="0" Grid.Row="2" />
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
<StackLayout>
<StackLayout Orientation="Horizontal" Padding="20,5,15,0">
<Label Text="Weight 3.00 Ton(PRE)" TextColor="#2196F3" HorizontalOptions="StartAndExpand" />
<Label Text="Amount" TextColor="#2196F3" HorizontalOptions="EndAndExpand" />
<Label x:Name="TotalAmount" />
</StackLayout>
</StackLayout>
<BoxView BackgroundColor="Silver" HeightRequest="1" HorizontalOptions="FillAndExpand" />
<StackLayout>
<StackLayout Orientation="Horizontal" Padding="0,5,15,0">
<Label Text="CGST" TextColor="#2196F3" HorizontalOptions="EndAndExpand" />
<Label x:Name="CGSTLabel" HorizontalOptions="EndAndExpand" />
</StackLayout>
<StackLayout Orientation="Horizontal" Padding="0,5,15,0">
<Label Text="SGST" TextColor="#2196F3" HorizontalOptions="EndAndExpand" />
<Label x:Name="SGSTLabel" HorizontalOptions="EndAndExpand" />
</StackLayout>
<StackLayout Orientation="Horizontal" Padding="0,5,15,0">
<Label Text="Total" TextColor="#2196F3" HorizontalOptions="EndAndExpand" />
<Label x:Name="SecondGrossTotal" HorizontalOptions="EndAndExpand" />
</StackLayout>
</StackLayout>
</StackLayout>
</ScrollView>
</ContentPage.Content>


This my code in XAML . i have passed MainPrint in
PDFManager.GeneratePDFFromView(MainPrint);

When i try to render my listview it doesnot show on the Pdf that i am generating.
have found the project on github and took reference from it-
https://github.com/akgulebubekir/PDFSharp.Xamarin.Forms.

But i am unable to render the listview.
Can anybody suggest any implementation.?


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 23, 2018 11:17 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 428
Location: CCAA
Rajat wrote:
have found the project on github and took reference from it-
https://github.com/akgulebubekir/PDFSharp.Xamarin.Forms.
[...]
Can anybody suggest any implementation.?
Why don't you ask the question on GitHub?

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group