Creating PDF files from an app

Discussion forum about all things Team Developer 7.x
Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 155
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Creating PDF files from an app

Post by Igor Ivanovic » 26 Apr 2018, 07:29

Hi,

For years I have been creating MS Word documents from my app and converting them to PDF with the MS Word Interop, which was working fine, although a little slow.
And not to mention I have a ton of problems when using it on a server for a batch creation of documents.

I have found a pretty good solution to replace MSWord - Syncfusion DocIO, but I have a big problem.
Their Word2PDF solution is not working as it should, the output is sometimes completely wrong, there are parts it even doesn't show, etc. and they have no plans of improving it.

So, I am trying to find a nonexpensive solution which has a good API I can incorporate in my SW and create PDF documents on the fly.
Obviously the PDF Print driver solutions are not an option for a number of reasons...

Any thoughts/suggestions on this?
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 691
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Creating PDF files from an app

Post by Dave Rabelink » 26 Apr 2018, 08:56

Hi Igor,

I'm not using PDF here (only viewing).

But there is a dll within the TD runtime folder which seems to be a 3rd party component.

PDFNetC.dll

My guess it is from here:

https://www.pdftron.com/pdfnet/

I haven't looked, but maybe it offers all you need.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Harald
Germany
Posts: 10
Joined: 30 Mar 2017, 06:16
Location: Oberhaching/Munich, Germany

Creating PDF files from an app

Post by Harald » 26 Apr 2018, 09:22

Hello Igor,

with TD 5 and newer you can create PDFs with the integrated Report Builder, so you don't need any 3rd party tool.

Kind regards
Harald

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 155
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Creating PDF files from an app

Post by Igor Ivanovic » 26 Apr 2018, 13:15

Dave Rabelink wrote:
26 Apr 2018, 08:56
Hi Igor,

I'm not using PDF here (only viewing).

But there is a dll within the TD runtime folder which seems to be a 3rd party component.

PDFNetC.dll

My guess it is from here:

https://www.pdftron.com/pdfnet/

I haven't looked, but maybe it offers all you need.
Hi Dave,
I saw it also, and my first idea was to use it, but it seems to me that it is an earlier version of PDFNet from 2014, and the convert doc to pdf function was introduced later in 2015...

It offers much more than I really need, and at a high price also :o :o

A simple convert docx to pdf is all I need, as I must create doc files, allow users to eventually modify them, and convert to PDF before sending them by mail.
Igor Ivanovic
Image

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 155
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Creating PDF files from an app

Post by Igor Ivanovic » 26 Apr 2018, 13:19

Harald wrote:
26 Apr 2018, 09:22
Hello Igor,

with TD 5 and newer you can create PDFs with the integrated Report Builder, so you don't need any 3rd party tool.

Kind regards
Harald
Hi Harald,

I am aware of it, but the documents I have to create are way beyond the capabilities of RB, as I have to use complex word templates to achieve the final result.
Thx anyway for your time.

Best regards
Igor Ivanovic
Image

clemdoc
Austria
Posts: 9
Joined: 08 Mar 2017, 09:51
Location: Austria

Creating PDF files from an app

Post by clemdoc » 02 May 2018, 07:30

We're dealing with the same situation, it's a nasty one.
If you find anything useful, please post your ideas.
I'm very interested and that might be true for others here as well.
Greetings, clem

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 155
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Creating PDF files from an app

Post by Igor Ivanovic » 03 May 2018, 13:12

Hi Clem,

I have found a resolution to my problem, it was right in front of my eyes! :o :o :o
I did false accuse Word2Pdf to not render the documents correctly, which was very wrong.
Only after I, by mistake ;) , sent the document to print only to found out that I am getting the same result in the printed document.
The DocIO rendering engine was the culprit, it was unable to correctly render a Word document with sections and nested sections, which we were using because we couldn't get nested tables to work correctly in Word InterOP.

DocIO handles nested tables nicely, so when I removed the sections and use nested tables instead to get the desired look of the document my problems were solved!
DocIO has some other features that I have trouble working with in MS Word, not to mention that I have been using MS Word interop on the server (only one instance) and had a ton of problems.

There is a limitation with StyleRefs, which are not supported and which I was using to have the footer filled with a hidden bookmark value, but who needs them now when I can fill the text in the footer section automatically.

So if you need to create automatic Word documents, manipulate them or convert to PDF on the server, Syncfusion Studio is the right answer.
They have a Community Edition for small companies like mine, which is free. :D :D

Hope this helps.
Cheers,
Igor Ivanovic
Image

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 155
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Creating PDF files from an app

Post by Igor Ivanovic » 03 May 2018, 13:37

Forgot to say, I didn't use the TD .NET explorer to generate code for calling DocIO assemblies.
I created a C# interface to DocIO, which has only a handful of methods that I call from TD.
It was much faster that way as I have found good samples on Syncfusion web as well as on https://stackoverflow.com
Igor Ivanovic
Image

User avatar
Charlie
Canada
Posts: 69
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Creating PDF files from an app

Post by Charlie » 04 May 2018, 10:02

That, Igor, is some fine sleuthing and right useful info. Good stuff !
A little trick to help direct folk from old Gupta forum to this one: Link to post

Return to “General Discussion”

Who is online

Users browsing this forum: [Bing], [Ccbot] and 0 guests