Welcome Guest Search | Active Topics | Sign In | Register

PdfViewer Control Options
creality
Posted: Wednesday, November 13, 2019 12:40:30 PM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
Is there any possibility to control PdfViewer?

Some of PDFs we want load have Adobe Forms. PdfViewer supports filling it, but we want "recover" data.

Is there any possibility to recover this with PdfViewer, or at least "Save" actual state of PDF or Save/Get actual PDF before close to recover later with EO.PDF?

Regards
eo_support
Posted: Thursday, November 14, 2019 10:54:58 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Thanks for your valuable feedback. The "Save" feature is on our list so it maybe implemented in the future.

I am not sure what you meant by "recover" data. Do you meant to read the form fields value from a PDF file that's already been filled? If that's what you need, you do not need to use the PdfViewer control. You can simply load the file with PdfDocument object and then check the object's Fields collection.

Please feel free to let us know if you have any more questions.
creality
Posted: Friday, November 15, 2019 6:04:09 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
Thanks for you quick reponse.

About "Save" feature, have you any timing?

About "recover" data you are right, I meant to read the form fields value from a PDF file that's already been filled. I know EO.Pdf and PdfDocument too. Problem or questions here is that user fills PDF in PdfViewer. I can use PdfDocument to fill actual data from BD to PDF. I can use PdfViewer to show filled PDF to user. User can change o fill new values in PDF using PdfViewer. BUT, I have to force user to manually save PDF from PDF Viewer, and later in other button, search saved PDF to recover data from PDF to BD with PdfDocument. I want "save" programatically in PdfViewer Close event for ex. to recover data without user interaction, so user only "Open pdf, fill values, close pdf". Pdf here "replaces" .net form.
eo_support
Posted: Friday, November 15, 2019 2:35:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
I see. So the only missing feature here is to save the contents from PdfViewer programatically. Is this correct?
creality
Posted: Saturday, November 16, 2019 11:28:44 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
Yes
creality
Posted: Thursday, May 25, 2023 10:54:18 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
I'm re-visiting PDF Viewer control and testing last version.

Have you finally implement "Save" function? I can't see anything about in Docs.

Regards,
Eduardo
eo_support
Posted: Thursday, May 25, 2023 2:01:04 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

The "Save" feature is supported but can not be controlled programatically. Inside the PDF Viewer, you would click the download link and select "with your changes". This would allow you to "Save" a copy of the PDF with form values you entered. Please let us know if this is what you are looking for.

Thanks!
creality
Posted: Friday, May 26, 2023 5:23:10 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
Hi,
I've seen that option, and is interesting, but it isn't what i am looking for.
I want do that "save with your changes" programatically, because i need to recover the form values entered, and i can't depend from user.
creality
Posted: Monday, August 28, 2023 6:08:54 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
Hi,
Any news about that? Do you finally understand what i'm requesting? It's possible? There is any timing to release it?
eo_support
Posted: Tuesday, August 29, 2023 9:16:39 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
creality wrote:
Hi,
Any news about that? Do you finally understand what i'm requesting? It's possible? There is any timing to release it?


Hi,

We have posted build 23.3.10 that supports this:

https://www.essentialobjects.com/doc/eo.winform.pdfviewer.save.html
https://www.essentialobjects.com/doc/eo.wpf.pdfviewer.save.html

Thanks!
creality
Posted: Wednesday, August 30, 2023 1:31:13 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
So great news!

Thank you, I'll test it as soon as possible and back with the results
creality
Posted: Tuesday, September 12, 2023 5:28:53 AM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
Hi, I tested the new function and I have two problems:
- First, the Save method opens a Save dialog to ask where to save doc. I want a "no user interaction" saving method, so the Save method would have a second param with the path, or at least save the PDF opened in the same path.
- Second, the saving is not working. If I use "Save", and choose a dir, the pdf is not saved.

On the other hand, I'm a bit confusing about "EO.Pdf.PdfViewerPreference" class. It's related to EO.Pdf.WinForm.PdfViewer? In this case, how can I associate? Why PdfViewerPreference have an "Document" property that gets the associated PdfDocument object and PdfViewer don't? Can I access PdfViewer underlying PdfDocument throught PdfViewerPreference?

Maybe if i can access to PdfDocument in PdfViewer, it's not necessary Save method, because PdfDocument have it....

Only to clarify/remember about my use case: In some specific cases, we use Pdfs with forms as a winform form replacement.

So what I am doing actually:
- Create PdfDocument, load pdf file, fill Pdf form with data from our DB and save pdf.
- Open filled PDF with Adobe Reader.
- User modify PDF form data and close document. With AcroJS added to the closing event of pdfs, we save filled and modified pdf in a fixed path.
- Detect PDF is closed and final pdf generated, create PdfDocument object, load fixed path modified pdf, recover filled form data and save back to our DB.

So actually I use EO Pdf to fill and recover data, but Adobe for the viewer part, and I want to use EO solutions in all process, using your PDFViewer to replace Adobe for two reasons: to avoid adding AcroJS to PDFs, and above all, to remove Adobe Reader dependency in our app.

Sorry for my english and thank you.

Regards
eo_support
Posted: Friday, September 15, 2023 12:23:24 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We will add the fileName argument in our next build.

We are not able to reproduce Save method not working at all issue though. We did reproduce one issue: If the PDF file does not have any form fields but you call Save(true), then nothing will happen. However if you call Save(false) on such file, the Save As dialog will still appear and you will still be able to save a copy of the file.

If you still have problem with the Save method not saving at all, please try to isolate the problem into a test project and send it to us. We will look into it again as soon as we have that.

Thanks!
eo_support
Posted: Wednesday, September 20, 2023 9:45:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

This is just to let you know that we have posted a new build (23.3.31) that should resolve these two issues:

1. Added fileName argument to Save method;
2. Save(true) should still succeed even if the file is not editable;

Please keep in mind that Save will fail if the file name is invalid. For example, "c:\test.pdf" is valid, but "c:/test.pdf" is NOT valid. Many part of the Chromium engine can correct interprets "/" and replace it with "\", but this particular part can not.

Thanks!
creality
Posted: Thursday, September 21, 2023 1:09:02 PM
Rank: Advanced Member
Groups: Member

Joined: 12/9/2014
Posts: 79
We tested it and for now, it works like charm.

Thank you very much!
eo_support
Posted: Thursday, September 21, 2023 4:42:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Thanks for confirming!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.