PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Apr 18, 2024 10:47 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Nov 20, 2014 9:56 pm 
Offline

Joined: Fri Oct 17, 2014 8:30 pm
Posts: 4
Hi,

We are migrating all our Crystal Reports PDFs to MigraDocs/PDFSharp. I am working on the attached form right now. It is fairly complex, and has many different sections. The report needs to look exactly the same.

Do you believe this can be accomplished using just MigraDocs? Or will I have to use a combination of MigraDocs/PDFSharp?

I am confident that I could build out each individual section of this report if they were to standalone on their own pages. However, I am struggling to understand how I can get all the sections to align like this on the page, and have the borders around them.

Can you please provide me with a few tips/suggestions on where I should get started, and what features I should use? For example, should I use PDFSharps ability to draw a rectangle around each section? If I draw a rectangle with PDFSharp, can I simply insert a MigraDoc table inside of this rectangle?


Thank you,
Nick


Attachments:
File comment: Sample report that was built in Crystal
ClinicalFormSample.zip [69.09 KiB]
Downloaded 353 times
Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 24, 2014 2:51 pm 
Offline

Joined: Thu Feb 13, 2014 7:09 pm
Posts: 13
I haven't used PDFSharp/MigraDoc in too many cases, but I would question using it as a report development tool.

It is a very powerful tool - however I am uncertain it is a reporting solution. Simple things like section suppressing, keep section together, repeat header on each page and physical report design are all benefits of Crystal Reports. For example, CR provides you a designer to build your report design. Whereas with PDFSharp/MigraDoc, you would need to programmatically create this design - it would be like developing HTML without a designer, but harder IMO. Simple modifications (i.e. move this field or delete this field) will become much more difficult - you will need to search through the source code for the particular field you want (rather than visually seeing it in the designer). Testing will be more complex as there is no designer preview tool built in.


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 24, 2014 3:09 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Hi!
curtis.watson wrote:
Whereas with PDFSharp/MigraDoc, you would need to programmatically create this design - it would be like developing HTML without a designer, but harder IMO.
MigraDoc creates documents much like Word does, but you do it from code.
Doing it from code is not a general disadvantage over a designer IMHO. It even gives you advantages if you have to prepare data for the report.

And MigraDoc can keep paragraphs together, will repeat header and footer on all pages.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 24, 2014 7:36 pm 
Offline

Joined: Thu Feb 13, 2014 7:09 pm
Posts: 13
In some cases, no designer is good. I knew the HTML example was a bad one because I've never in life used an HTML designer. However at the same time, the layout of a website is typically pretty generic - header area, menu area (either left or top) and body area. Then within the body area you do whatever you want...

Anyhow, I guess my point in this was that it is possible. But personally, working as a developer and designing/developing business systems for the company I work for, I couldn't fathom trying to generate a report design and keep it up to date with PDFSharp/MigraDoc - not saying the capability isn't there. It would be more of a concern in regards to maintenance - having to update it, add in things or giving it to another person to update. The user should think about the amount of time it would take to learn this new technology and implement it, and the cost of that if the company were to get a new developer in that had to maintain this - they would then need to invest that same amount of time to learn this new technology. I spent days fine-tuning the small amount of work we did with this - add a table to the bottom of an existing PDF document.


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 25, 2014 9:49 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
The first version of MigraDoc came with a Word add-in that used Word as a designer for MigraDoc.
The current version of MigraDoc does not (yet) have such a designer. We use MigraDoc to create reports from code - sometimes this is better than working with a designer, sometimes a designer would save some time.
To some extent this is a matter of experience.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 05, 2014 3:24 pm 
Offline

Joined: Fri Oct 17, 2014 8:30 pm
Posts: 4
I ended up building out the entire report using PDFSharp. Once I started working with it, I realized how powerful of a tool it truly is. I was able to build each section of the report independently, and the coordinate calculations are contained within the specific section. This allows me to make changes to the layout of the report fairly easily. This document seems to change every month, because doctors can't make up their minds. I will keep you posted on my experience with making modifications to the report. However my experience so far is much better than Crystal. Getting elements to line up EXACTLY how I want them on the page is so much easier in code, then in the Crystal designer.

I can post the code if anyone cares to see it as an example. There's some refactoring to do, but I think it works pretty well.


Cheers,
Nick


Attachments:
File comment: Clinical Form created with PDF Sharp
ClinicalForm_PDFSHARP.zip [37.77 KiB]
Downloaded 392 times
Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 08, 2014 9:34 pm 
Offline

Joined: Mon Dec 08, 2014 9:27 pm
Posts: 1
Hello NickYoung68,

thank you for offering to donate your code producing "ClinicalForm_PDFSHARP" - I would appreciate it very, if you could post or email it!
Best regards
kaheiho


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 109 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