当前位置:网站首页>Moonpdflib Preview PDF usage record
Moonpdflib Preview PDF usage record
2022-07-25 00:30:00 【solar storm】
MoonPdfLib preview PDF Use records
introduction :MoonPdfLib Is a relatively excellent PDF Preview Library , be based on WPF and C# Developed , Of course. , Function is embedding WPF A preview in the application PDF Control , Getting... Is not supported PDF The contents of the document , Nor does it support finding and locating PDF.
- System : Windows 10.0.19044 Home Edition
- Tools :Visual Stdio 2019 community
- Net: .Net FrameWork 4.6.2
- The application type :WPF Desktop application
One 、 Installation instructions
1. Download library
GitHub:https://github.com/reliak/moonpdf
sourceforge Address :https://sourceforge.net/projects/moonpdf/files/MoonPdf-0.3.0/
You can use it directly sourceforge Website compiled binary Library 
The following is to 0.3.0-x64 For example
First download this directly MoonPdfLib-0.3.0-x64.zip file ; Do the same for other architectures
2. Introduce projects
1、 establish .netframwork wpf Program 
2、 Set up the following directory meanwhile Assign the following files to this DLL Under the table of contents 
3、 Modify the project configuration to x64
4、 Reference in project The library
“ quote ” - “ Add reference ” - “ Browse ” -“ Browse ”
Click OK again 
5、 In the libmupdf.dll Copied to the Debug In the running directory 
Two 、 Instructions
1、 In the project Interface file MainWindow.xaml Add the following code to
- The front-end code
<Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:WpfApp1" xmlns:mpp="clr-namespace:MoonPdfLib;assembly=MoonPdfLib" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800">
<Grid>
<mpp:MoonPdfPanel x:Name="readerPDF" Loaded="MoonPdfPanel_PdfLoaded" Background="LightGray" ViewType="BookView" PageMargin="0,2,4,2" AllowDrop="True"/>
</Grid>
</Window>
- Background code
using System;
namespace WpfApp1
{
/// <summary>
/// MainWindow.xaml Interaction logic of
/// </summary>
public partial class MainWindow : System.Windows.Window
{
public MainWindow()
{
InitializeComponent();
}
private void MoonPdfPanel_PdfLoaded(object sender, EventArgs e)
{
readerPDF.OpenFile(@"C:\Users\zhanghongyuan\Desktop\new.pdf");
readerPDF.Zoom(1.25);
readerPDF.ZoomToWidth();
}
}
}
3、 ... and 、 Running results

边栏推荐
- EF core: self referencing organizational structure tree
- MySQL common basic commands
- Verification of Kirchhoff's law and Multisim Simulation (engineering documents attached)
- 4. Immersion test
- Internal network mapping port to external network
- Oracle is not null cannot filter null values
- Promtool Check
- Promtool Check
- Notes on topic brushing (XXII) -- Dynamic Planning: basic ideas and topics
- Pit record: typeerror:'module'object is not callable
猜你喜欢

Internal network mapping port to external network

Dpdk based basic knowledge sorting-01

ROS manipulator movelt learning notes 3 | kinect360 camera (V1) related configuration

c语言:深度刨析函数栈帧

NXP i.mx6q development board software and hardware are all open source, and the schematic diagram of the core board is provided

Qt项目-安防监控系统(各个界面功能实现)

EF core: self referencing organizational structure tree

mysql初次安装的root密码是什么

Heap and stack in embedded development

Notes on topic brushing (XXII) -- Dynamic Planning: basic ideas and topics
随机推荐
LeetCode_392_判断子序列
Managing databases in a hybrid cloud: eight key considerations
GUI basic application
Sql文件导入数据库-保姆级教程
NVIDIA inspector detailed instructions
R language uses ISNA function to check whether the list and dataframe contain missing values, marks abnormal values in data columns in dataframe as missing values Na, and uses na.omit function to dele
[hero planet July training leetcode problem solving daily] 24th line segment tree
Qt项目-安防监控系统(各个界面功能实现)
Nodejs package
Palm package manager of kubernetes learning offline installation of NFS client provider
C language force buckle the flipped number of question 7. Violence Act
Verification of Kirchhoff's law and Multisim Simulation (engineering documents attached)
paddlepaddle论文系列之Alexnet详解(附源码)
The font changes with the change of the form
Technical operation
The use of where condition in MySQL is not equal to! = The problem that null values are filtered out occurs when in, etc
[英雄星球七月集训LeetCode解题日报] 第24日 线段树
Implement a avatar looping control
torch.nn.SyncBatchNorm.convert_ sync_ Mindspore usage corresponding to batchnorm
[mindspore] [mode] spontaneous_ The difference between mode and graph mode