In my initial PDF form I have Image and some boutton(boutton as to be seen when editing but not when printing) but when open my document in PdfViewer it doesn't show image and bouton
|
At present we don’t have support for displaying the button form field in our PDF Viewer control. Please find the feedback link below,
https://www.syncfusion.com/feedback/10234/support-to-render-the-button-form-fields-in-the-pdf-viewer
We do not have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features. We will let you know when this feature is implemented. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. |
I want to save my files in DB but it like the size is too much or I don't know if I use a PDF file size like 10ko it save correctly in database, but when tring save a file with 1MO my program plant. my column size in my db is Varbinary(Max) I find in forum and implement the options given but nothing . In Startup.cs I add this
/////////////////////////////////////////////////////////////////////////////////////////
services.AddSignalR()
.AddHubOptions<ChatHub>(e => {
e.MaximumReceiveMessageSize = 102400000;
});
///////////////////////////////////////////////////////////////////////////////////////////
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
endpoints.MapHub<ChatHub>(
"/chatHub",
o =>
{
o.ApplicationMaxBufferSize = 102400000; // larger size
o.TransportMaxBufferSize = 102400000; // larger size
}); //("/chatHub");
});
If I want to just save the form Data not all the PDF itself" How can I perform it with the component. My scenario is to always have and Empty dynamic form pdf in a folder of my application. then when load file from one customer it will just get the data of form save in db and then fill my pdf form with value and if someone modyfing and then click on save button it update the database value.
I see the functionnality on the link https://help.syncfusion.com/wpf/pdf-viewer/import-export-form-data-using-pdf-viewer but I don't see an equivalent with blazor/NetCore Component.
|
We can import and export the form fields data from the PDF document. We have made the changes in our source and prepared the custom nuget package (Syncfusion.EJ2.Blazor.PdfViewerServer.Windows) and also in ejs.interop.min.js file for exporting and importing the form-fields value as the json file to the PDF document using PDF Viewer control. Please find the custom nuget package and the sample below.
Sample:
We can also export the form fields value as the JSON object by using this we can save only the form fields data in a DB . But we have facing some issue on exporting the form fields value as the JSON objects in Blazor framework. We will validate the same and update you the details on November 20th 2019.
Note: The changes for importing and exporting form fields will be provided in our upcoming weekly nuget release which will be on November 27th 2019.
|
The EnableFormFields property suppose to enable form field but it just like doing nothing
private bool EnableFormFields = true;
protected async Task EnableFormField(){
EnableFormFields = false;
this.StateHasChanged();
}
|
At present we don’t have support for two-way binding for the EnableFormFields property. This property enables or disable the form fields in the PDF document during the initial loading of the PDF document in PDF Viewer control. We will validate the query “If we provide the EnableFormFields as false on button click then the form fields has to be disabled” and update you with more details on November 21st 2019.
Can you please let us know the exact requirement whether you need to disable the form fields on providing EnableFormFields as false on button click. if not , Please provide more details about that query. | |
How to reinitialize pdf Form field when clik on boutton |
Kindly confirm us whether you are trying to reinitialize the form fields data by resetting the filled data with default values once download or some other action performed. If yes, we can reinitialize the form field by importing the default values for the form fields to the PDF Viewer control. If the provided details is not meet your requirement, please provide more details about on it. | |
I Have install the nupkg and implement the code you joint but nothing happen when click on the import bouttons it suppose to load form data but nothing
I even add this.StateHasChanged() without any reaction of pdf form
protected async Task ImportFormFields(){
Viewer.ImportFormFields(@"wwwroot/Data/FormFillingDocument.json");
this.StateHasChanged();
}
|
We have used the code snippet which you have provided for importing the form fields data and it imports the form data correctly in to the PDF document.
Can you please ensure whether the FormFillingDocument.json file is available inside the wwwroot/Data/ folder. And also ensure whether you have refereed the provided NuGet and ejs.interop.min.js file(Which is present inside the wwwroot folder) in your application.
Steps to install the provided NuGet file in your application.
1.Extract the provided Nuget(https://www.syncfusion.com/downloads/support/forum/149148/ze/Nuget11447401278.zip ) in the machine and in the visual studio go to Tools—>Options—>NuGet Package Manager-à Package Source . Then click on the (+) symbol in the right side top.
2.Then provide the name and the source is which the provided NuGet extracted location. Then click on update and click OK.
3.Then go to Tools—>NuGet Package Manager—>Manage NuGet Package For Solution. Then in the right side there will be a dropdown. Select the name from the dropdown which you have provided on adding the NuGet location in the package source dialog.
4. Then in Browse tab the NuGet package will be displayed. Select the NuGet based on the Operating system and click on install, then the selected NuGet will be added in your application.
Steps to add the ejs.interop.min.js file in your application.
1.Extract the provided sample and in the wwwroot folder ‘ejs.interop.min.js’ file will be placed . Copy the file and paste the same in your application inside the wwwroot folder.
2. Then go to the pages folder in that open the _Host.cshtml file and inside the head tag refer the js line. Please find the code-snippet below.
Adding the JSON file in your application.
1.Copy the FormFillingDocument.json inside the wwwroot/Data folder in the project and paste the same in your application in the wwwroot/Data folder.
Note: We can import the data only for the provided FormFillingDocument . For other PDF document you have the export the data for that specific document and import the same by specifying the exported Json file location inside the ImportFormFields method. | |
I want to save my files in DB but it like the size is too much or I don't know if I use a PDF file size like 10ko it save correctly in database, but when tring save a file with 1MO my program plant. my column size in my db is Varbinary(Max) I find in forum and implement the options given but nothing . In Startup.cs I add this
/////////////////////////////////////////////////////////////////////////////////////////
services.AddSignalR()
.AddHubOptions(e => {
e.MaximumReceiveMessageSize = 102400000;
});
///////////////////////////////////////////////////////////////////////////////////////////
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
endpoints.MapHub(
"/chatHub",
o =>
{
o.ApplicationMaxBufferSize = 102400000; // larger size
o.TransportMaxBufferSize = 102400000; // larger size
}); //("/chatHub");
});
|
We are currently checking on the issue by storing the large size PDF document in the database. we will analysis further and update you with more details on November 21st 2019. |
We can also export the form fields value as the object by using this we can save only the form fields data in an DB . But we have facing some issue on exporting the form fields value as the objects in Blazor framework. We will validate the same and update you the details on November 20th 2019.
|
We have confirmed that the reported issue” Exporting the form fields value as the objects in Blazor framework is not working properly” is a defect and logged the defect report for the same. The fix for the issue will be included in our Essential studio volume 4 release which will be available at the end of December 2019. You can track the status of the implementation using the below link,
|
At present we don’t have support for two-way binding for the EnableFormFields property. This property enables or disable the form fields in the PDF document during the initial loading of the PDF document in PDF Viewer control. We will validate the query “If we provide the EnableFormFields as false on button click then the form fields has to be disabled” and update you with more details on November 21st 2019. |
We confirmed the query “Providing two-way binding support for EnableFormFields API” as a usability feature and logged the feature report for the same. The fix for the usability feature will be provided on Volume 4 SP1 release which will be available at the end of December 2019. You can track the status of the implementation using the below link,
| ||
We are currently checking on the issue by storing the large size PDF document in the database. we will analysis further and update you with more details on November 21st 2019.
|
We have created the local DB and stored the PDF document of 2MB size in to the DB. But the reported issue is not reproduced in our end, We suspect that the issue is due to the code you have used in your project for increasing the maximum buffer size. Kindly use the below code for increasing the maximum buffer size in your application.
Startup.cs
We have also shared the sample for saving the PDF document as byte array in DB which also contains the provided code for increasing the maximum buffer size. Kindly download the sample from the below link.
Note: The provided sample also contains the md file. Please change the connectionString in the SaveDocument method in Index.razor file in the sample for storing the data.
Steps for changing the connection string.
Kindly refer the Blazor UG documentation link for more details about using the PDF Viewer control.
Please try with the latest version .Net core version (https://dotnet.microsoft.com/download/dotnet-core/3.1)
|
Query |
Details |
I'm using Visual Studio Code (blazor server side) I add Local Nuget Package like this
dotnet add package Syncfusion.EJ2.Blazor.PdfViewerServer.Windows --version 17.3.0.26-beta --source C:\TFS\nuget_repo
|
We suspect that the reported issue occurred due to version conflicts. So can you please upgrade both Nuget Packages (Syncfusion.EJ2.Blazor.PdfViewerServer.Windows), scripts and css to same version(v17.3.0.29) to resolve the issue. |
In _Host.cshtml i add
<link rel='nofollow' rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.3.27/material.css" rel="stylesheet" />
<script src="https://cdn.syncfusion.com/ej2/17.3.27/dist/ej2.min.js"></script>
<script src="~/js/ejs.interop.min.js"></script>
my js files is in \wwwroot\js\ejs.interop.min.js
| |
The export code is suppose to store the json file where? Since no path is specified?
public void ExportFormFields(MouseEventArgs args)
{
viewer.ExportFormFields();
}
|
We regret for the inconvenience caused. The implementation to export the form fields was not included in our latest release. However the changes will be included in our 2019 Volume 4 release which is expected to be rolled out on December 16th, 2019. |
But import and export data
not working, as you said export is not yet implemented, is it the case of
import also? because like you have said
0- I using VS Code with
sdk 3.1.100-preview2-014569 - Blazor server side app
1- I upgrate to 17.3.0.29-beta version
2- In _host.cshtml
<link
rel='nofollow' rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.3.29/material.css"
rel="stylesheet" />
<script
src="https://cdn.syncfusion.com/ej2/17.3.29/dist/ej2.min.js"></script>
<script
src="~/js/ejs.interop.min.js"></script> // even if I include <script src="https://cdn.syncfusion.com/ej2/17.3.29/dist/ejs.interop.min.js"></script> the import doesn't work.
2- In _imports.razor
@using
Syncfusion.EJ2.Blazor.PdfViewer
@using
Syncfusion.EJ2.Blazor.PdfViewerServer
3- In .csproj
<PackageReference
Include="Syncfusion.EJ2.Blazor.PdfViewerServer.Windows"
Version="17.3.0.29-beta" />
<PackageReference
Include="Syncfusion.Licensing" Version="17.3.0.29" />
<PackageReference
Include="Syncfusion.EJ2.Blazor" Version="17.3.0.29-beta"
/>
4- In wwwroot\Data\ I have my 2 files FormFillingDocument.pdf & FormFillingDocument.json
5- In page code
<EjsButton
OnClick="@ImportFormFields">ImportFormFields</EjsButton>
<EjsPdfViewerServer
DocumentPath="@documentPath" @ref="@viewer"
Width="1060px" Height="750px" EnableRtl="true"
Locale="fr-CH"/>
@code {
EjsPdfViewerServer viewer;
string documentPath { get; set; } = "wwwroot/Data/FormFillingDocument.pdf";
public void ImportFormFields(MouseEventArgs args){
Viewer.ImportFormFields(@"wwwroot/Data/FormFillingDocument.json");
}
}
Q1- I'm I missing somethings about import pdf Data?
Q2- Is the
Viewer.ImportFormFields("") just take a json file or it will
handle all types (*.xml, *.xfdf )??
Q : How to have Pdf Toolbar
tooltip in french ?
Thanks,
Chimène NK.
Q1- I'm I missing somethings about import pdf Data? |
As we mentioned in earlier update the changes for the import/export of form fields value is not included in our previous weekly release package. However the changes will be included in our upcoming 2019 Volume 4 release, which is expected to be rolled out on December 16th, 2019.
|
Q2- Is the Viewer.ImportFormFields("") just take a json file or it will handle all types (*.xml, *.xfdf )?? |
We have provided the support for import/export the form fields data as JSON format only. |
Q : How to have Pdf Toolbar tooltip in french ? |
We are currently working on the sample to localize the PDF Viewer tooltip to French, we will update you with sample on December 13th, 2019 |
Query |
Details |
I just update my Syncfusion version Pdf Export work well, even if it will be useful to us to specified a folder or have the possibility to save the json into Database, in fact we need to be able to get the export files in order to do what we want with according to our scenario(it is very very very important!).
Also Import Work Thanks!
|
As mentioned earlier, we will analyze further on to specify the export folder and update you with more details on December 30th, 2019. |
I note some incoherence, if I give a wrong files name or not existing file in pdf import functions no error is throw, I think it will be nice to throw error to help the programmer know why his action doesn't Handle well.
e.g i was trying to import a Json file with space into key, or with uppercase at the start of key name since no error throwing I was not able to know why my import function doen't work ...
|
Currently we do not have support to notify the user when wrong file name or not existing JSON file name is provided. We will analyze further on it and update you with more details on December 31st, 2019 |
the export features with specifying the export folder or else saving the JSON object in a var will be available when ??because I have a date for the import features with JSON object (5th February), but nothing about the other features.
|
We have analyzed the feasibility to achieve your requirement and the fix for the implementation will be included in our upcoming weekly NuGet release on February 5th, 2020 |
I Have a Question, the above code doesn't work but if I specified _documentPath with a path (ex: _documentPath = "wwwroot/Data/Temp/PDFDynamique.pdf";) or else if I write the _viewer.SaveAsBlob() in a filestrem and then give the path to _documentPath export Work but since the _documentPath Have and base64 data export doesn't work.I'm comming from database with the empty dynamic pdf template so it's a mandatory to work with a real pdf file?<EjsPdfViewerServer DocumentPath="@_documentPath" @ref="_viewer" Width="1060px" Height="750px" /> <input type="submit" class="btn btn-outline-primary" @onclick="@ExportFormFields" value="Exporter" />@code{ EjsPdfViewerServer _viewer; string _documentPath { get; set; } protected override async Task OnInitializedAsync() & |