Solved

How to open a DynamicPDF document in vb.net

Posted on 2009-05-05
2
795 Views
Last Modified: 2013-11-27
Hi Experts

I used DynamicPDF to create a report template and would like to use VB.Net to write data to that report in a PDF format. The dynamicPDF report is named "Document1.DPLX". I can already create a blank PDF in my program(see code). All I want to do is write this data directly to the Document1.DPLX template. Can anyone please help me with this?

Thanx in advance
Imports System
Imports Microsoft.VisualBasic
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
 
        Dim MyDocument As ceTe.DynamicPDF.Document = New ceTe.DynamicPDF.Document()
 
        MyDocument.Creator = "HelloWorld.aspx"
        MyDocument.Author = "Your Name"
        MyDocument.Title = "Hello World"
 
 
        Dim MyPage As ceTe.DynamicPDF.Page = New ceTe.DynamicPDF.Page(PageSize.Letter, PageOrientation.Portrait, 54.0F)
 
        'MyPage.Elements.Add(New LayoutGrid())
 
        Dim Text As String = Label1.Text.ToString()
        Dim Text2 As String = Label2.Text.ToString()
        Dim x, y As Integer
        Dim x2, y2 As Integer
 
        x = Label1.Location.X
        y = Label1.Location.Y
 
        x2 = Label2.Location.X
        y2 = Label2.Location.Y
        'Dim MyLabel As Label = New Label(Text, 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center)
        Dim mylab As Label = New Label(Text, x, y, 504, 100)
        Dim mylab2 As Label = New Label(Text2, x2, y2, 504, 100)
 
 
        MyPage.Elements.Add(mylab)
        MyPage.Elements.Add(mylab2)
        MyDocument.Pages.Add(MyPage)
 
        MyDocument.Draw("HelloWorld.pdf")
 
        System.Diagnostics.Process.Start("HelloWorld.pdf")

Open in new window

123456.JPG
1234567.JPG
12345678.JPG
0
Comment
Question by:Benvor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
kaylanreilor earned 500 total points
ID: 24311499
0
 

Author Comment

by:Benvor
ID: 24311564
Thanx for the reply, there was a few useful stuff, but nothing on reporting..
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.net Filesystem watcher not working 5 58
vb.net background worker crossthread 11 48
Format Transaction Number 19 50
Broken .resx file generating errors 18 44
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question