pdf

powershell word to pdf

☆樱花仙子☆ 提交于 2021-01-28 09:07:28
问题 I modified what someone else had on this forum, based on a successful use of powershell Excel to pdf with no success. Any ideas on my failing in the following code? My goal is to be able to convert an entire folder of doc and docx documents to pdf without opening the native applications. Thanks in advance: # Acquire a list of DOC files in a folder $Word = New-Object -ComObject word.application $path = "c:\Users\Desktop\Test" $formats = "Microsoft.Office.Interop.Word.WdFixedFormatType" -as

Merging two PdfDocument objects

风流意气都作罢 提交于 2021-01-28 09:02:21
问题 Simple question , how to merge two PdfDocument objects using itext7 .net Library ? this is how am trying but it's not working PdfDocument GlobalPdfDocument = new PdfDocument(new PdfWriter(multiContentPdf)); PdfDocument InitialPdfDoc = new PdfDocument(new PdfWriter(memStreamOfAddressAndBarcode)); InitialPdfDoc.CopyPagesTo(1, InitialPdfDoc.GetNumberOfPages(), GlobalPdfDocument); also this code throw same exception Merger.Merge(InitialPdfDoc,1,InitialPdfDoc.GetNumberOfPages()); Cannot copy

powershell word to pdf

怎甘沉沦 提交于 2021-01-28 08:41:11
问题 I modified what someone else had on this forum, based on a successful use of powershell Excel to pdf with no success. Any ideas on my failing in the following code? My goal is to be able to convert an entire folder of doc and docx documents to pdf without opening the native applications. Thanks in advance: # Acquire a list of DOC files in a folder $Word = New-Object -ComObject word.application $path = "c:\Users\Desktop\Test" $formats = "Microsoft.Office.Interop.Word.WdFixedFormatType" -as

Send a PDF generated from an API to an external server?

我与影子孤独终老i 提交于 2021-01-28 08:27:05
问题 I have a NodeJS-ExpressJS server (to host a web page) and Django API server. When a specific endpoint in the Django server is called from the ExpressJS server (when a user clicks a button on the web page), a PDF is generated. I want to send this PDF from the Django server to the ExpressJS server and then download it to the user's browser (The user only interfaces with ExpressJS server). In order to do this I encode the PDF as a base64 string in the Django server and return the string in an

PDFBox scrambling the text

拜拜、爱过 提交于 2021-01-28 05:21:36
问题 I have been trying to edit a PDF document to pre-fill form entries. I've got it working (sort of). The text I'm adding, goes in fine. However, other text that was already there seems to have gotten replaced with "&%£!£! symbols. I've worked out that it's something to do with the "contentStream" section in the code below. It seems to be the "setFont" line. If I remove it, the page remains OK... except that the "Hello Richard" text is no longer displayed! Help please! package pdfboxtest; import

Flutter pdf generation too slow with image

筅森魡賤 提交于 2021-01-28 05:06:20
问题 im working on a pdf generator app in flutter, but when i want to add an image to the pdf, it takes too long also i wanted to know how it is possible to add multiple images. Im using 3 libraries, image picker - pdf - printing here is my code: Future getImage() async { var image = await ImagePicker.pickImage(source: ImageSource.gallery); final tempDir = await getTemporaryDirectory(); final path = tempDir.path; int rand = new Math.Random().nextInt(10000000); imge.Image imagee = imge.decodeImage

How to export multiple ranges to a single PDF?

断了今生、忘了曾经 提交于 2021-01-28 04:44:03
问题 I want to export multiple ranges from the same sheet to a single pdf. Account 1 starts in column A, account 2 starts in column C, account 3 starts in column E, and so on. Each account can be n rows long, but I only want a maximum of 50 rows for each account on a sheet within the pdf, e.g. Account 1 = 100 rows long Account 2 = 32 rows long Account 3 = 56 rows long In this case, I would want my pdf to look like this: Sheet 1 = first 50 rows of account 1 Sheet 2 = next 50 rows of account 1 Sheet

How to correctly read PDF into nodejs Buffer from Google Drive API's export method?

眉间皱痕 提交于 2021-01-28 04:42:37
问题 I'm trying to read a PDF from the Google Drive v2 API export method into a nodejs Buffer so it can be emailed as an attachment or saved, but when I view it, it looks blank, like all whitespace. I'd expect the PDF to appear the same as when exported and viewed through the Google Drive browser app. Namely that something shows, since the content-length: 55243 . I've tried the following: var drive = google.drive('v2'); drive.files.export({ auth: auth, fileId: ..., mimeType: 'application/pdf' })

Outlook email to pdf security prompt

谁都会走 提交于 2021-01-28 04:37:14
问题 I have a task which i need to create a program that converts outlook email to pdf. this is my code Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application(); NameSpace outlookNs = app.GetNamespace("MAPI"); MAPIFolder rootFolder = outlookNs.Stores["Blah"].GetRootFolder(); List<MailItem> mailItems = new List<MailItem>(); Folders subFolders = rootFolder.Folders; foreach (Folder folder in subFolders) { if (folder.Name == "Inbox") { Items items = folder

R:plot : fitting multiple plots properly on one A4 pdf page

眉间皱痕 提交于 2021-01-28 03:02:45
问题 I have a multiple plot and I want to print it on an A4 pdf page so that the charts fill the whole page. When I used the code below I got a lot of blank space above and below the charts. How can I reduce this blank space to about 1cm and increase the chart height? Thank you for your help. group <- "Title" layout(matrix(c(1:12), 6, 2) ) par(mar = c(0, 4.1, 1.5, 2.1),oma = c(2, 0, 2, 0)) plot(1:10) plot(1:10) plot(1:10) plot(1:10) plot(1:10) plot(1:10) plot(1:10) plot(1:10) plot(1:10) plot(1:10)