-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API to generate PDF (or XPS) documents #672
Comments
In the short term it seems like a WebView would be able to do what you want. To know how to accomplish this for XAML can you give a bit of an overview of what kind of form controls you're using and what you would expect from a PDF export? |
I see this PDF issue wasn't closed or relocated, so does this also mean that the microsoft-ui-xaml repo is the correct repo to post issues regarding Windows.Data.Pdf.PdfDocument? @bgulrich wrote:
Isn't your proposal practically the same as the preexisting ability of a UWP app to print anything to the virtual printers named "Microsoft Print to PDF" and "Microsoft XPS Document Writer"? What's the difference? Why can't you use I'm not saying you're wrong. I'm just asking questions to try to gain a better understanding of your proposal. PDF's are also important in our environment. @chrisglein wrote:
Unless I'm mistaken, WebView supports neither display of PDF's nor printing a HTML webpage to any printer. In contrast, the beta version of WebView2 does support both of those functions. |
I think the problem with using the virtual printers is that they require user interaction because you can't print to those without showing the print UI, and you can't specify the resulting filename/location to where it prints to. So basically you can not create a pdf/xps automatically, e.g. in a background task. |
@stefankueng There are 2 issues there:
Obviously it would be beneficial for UWP apps to support both of the above. The default security setting should be to disallow UWP apps from skipping the print dialog, but this security issue has an easy solution: In the "Capabilities" section of the "Package.appxmanifest", create a new capability that represents printing without dialog. A supplementary proposal is: Extend Windows.Data.Pdf to support PDF creation. Currently it only supports rendering. If it is extended to support PDF creation, then this would operate without the printing API, thus print dialogs would be non-applicable. It could also be usable in ASP.NET web-apps in addition to UWP apps -- this would be a big advantage, especially because many web-apps need the ability to create PDF documents. Does anyone know which repo owns the namespace I found the following request in UserVoice. We can all add our votes and comments to it. |
PDF、PDF、PDF。 |
Proposal: API to generate PDF (or XPS) documents
Summary
In some LOB applications, XAML controls are a good way to present a user with an interactive form that can highlight sections that should be filled out, accept signatures in inking panels, etc. Once complete, it would be helpful to be able to save the contents of this control as a PDF (or XPS document).
Rationale
Many LOB applications require a locked copy of a document that isn't merely recreated from source data at runtime. This would also be helpful in scenarios where the underlying document template changes over time.
Functional Requirements
Important Notes
Open Questions
The text was updated successfully, but these errors were encountered: