pdf

How to set CSS for embedded PDF viewer with CSP enabled

生来就可爱ヽ(ⅴ<●) 提交于 2020-07-20 10:28:27
问题 I got the following problem: Having set Content-Security-Policy style-src 'self' within .htacess file, chrome complains in the developer console when displaying PDF files linked like <a href="file.pdf"> . Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-[deleted]'), or a nonce ('nonce-...') is required to enable inline execution. I can also see that chrome applies some css

Itext PDF do not display correctly Myanmar Unicode Font

只愿长相守 提交于 2020-07-18 17:27:13
问题 Itext 5 do not display correctly at generated pdf file for Myanmar Unicode fonts. Itext version : 5.5.13.1 Expectation Result : သီဟိုဠ်မှ ဉာဏ်ကြီးရှင်သည်အာယုဝဎ္ဍနဆေးညွှန်းစာကို ဇလွန်ဈေးဘေးဗာဒံပင်ထက် အဓိဋ္ဌာန်လျက် ဂဃနဏဖတ်ခဲ့သည်။ Actual Result : Google Drive Link for generated PDF. My test string is similar with "The quick brown fox jump over the lazy dog" in English. It contains most of Myanmar alphabets. Java program that I used to product above pdf String fileName = "sample.pdf";

How to download Rhandsontable output into .xlsx and .pdf?

邮差的信 提交于 2020-07-18 08:41:25
问题 I would like to download rhandsontable output object from an R Shiny app into .xlsx and .pdf format. Does anyone have any idea how to do this? For example, I want to download the tables in the results tab in the app below (the codes are copied from my other question earlier): library(shiny) library(rhandsontable) ui <- navbarPage("App", tabPanel("Input", numericInput('num_of_table', "Number of sub tabs: ", value = 1, min = 1, max = 10), uiOutput("input")), tabPanel("Results", uiOutput(

How to embed font in PDF created from HTML with iText and Flying Saucer?

谁说胖子不能爱 提交于 2020-07-17 09:52:26
问题 I have problem with embedding Polish fonts into PDF converted from HTML. My HTML code have style in body: <BODY style="font-family: Tahoma, Arial, sans-serif;font-size : 8pt;"> I tried 2 ways of converting such HTML into PDF: FOP with htmlcleaner iText with flying-saucer For FOP I can add all used fonts into its config file and then created PDF have those fonts embedded (if font is used in HTML). In resulting PDF I have Tahoma font in Identity-H encoding. It looks good -- all Polish letters

How to embed font in PDF created from HTML with iText and Flying Saucer?

烈酒焚心 提交于 2020-07-17 09:52:23
问题 I have problem with embedding Polish fonts into PDF converted from HTML. My HTML code have style in body: <BODY style="font-family: Tahoma, Arial, sans-serif;font-size : 8pt;"> I tried 2 ways of converting such HTML into PDF: FOP with htmlcleaner iText with flying-saucer For FOP I can add all used fonts into its config file and then created PDF have those fonts embedded (if font is used in HTML). In resulting PDF I have Tahoma font in Identity-H encoding. It looks good -- all Polish letters

Remove the last page of a pdf file using PDFtk?

妖精的绣舞 提交于 2020-07-16 16:15:39
问题 Can someone please tell me how to remove the last page of a PDF file, using PDFtk? 回答1: Using the cat operation, and specifying a page range. pdftk infile.pdf cat 1-r2 output outfile.pdf 回答2: You need to find out the page count, then use this with the pdftk cat function, since (AFAICT) pdftk does not allow one to specify an "offset from last". A tool like 'pdfinfo' from Poppler (http://poppler.freedesktop.org/) can provide this. Wrapping this in a bit of bash scripting can easily automate

Remove the last page of a pdf file using PDFtk?

心已入冬 提交于 2020-07-16 16:13:13
问题 Can someone please tell me how to remove the last page of a PDF file, using PDFtk? 回答1: Using the cat operation, and specifying a page range. pdftk infile.pdf cat 1-r2 output outfile.pdf 回答2: You need to find out the page count, then use this with the pdftk cat function, since (AFAICT) pdftk does not allow one to specify an "offset from last". A tool like 'pdfinfo' from Poppler (http://poppler.freedesktop.org/) can provide this. Wrapping this in a bit of bash scripting can easily automate

Save an email attachment automatically to map with qmail and reformime

放肆的年华 提交于 2020-07-16 06:07:44
问题 Save an email attachment automatically to map with qmail and reformime I'm trying to move attachment automatically to another locatie with the dot-qmail file. My .qmail file #------------------------------------------------------------ | condredirect pdf-junkmail headermatch 'X-Spam-Status: Yes' | reformime -X /bin/sh -c "if [ "\${FILENAME#*.}" == "pdf" ]; then cat > /home/users/name/home/$(date +%Y%m%d)_\$FILENAME; fi" # Forward not set # Vacation Message not set ./Maildir/ This works for a

Save an email attachment automatically to map with qmail and reformime

放肆的年华 提交于 2020-07-16 06:06:32
问题 Save an email attachment automatically to map with qmail and reformime I'm trying to move attachment automatically to another locatie with the dot-qmail file. My .qmail file #------------------------------------------------------------ | condredirect pdf-junkmail headermatch 'X-Spam-Status: Yes' | reformime -X /bin/sh -c "if [ "\${FILENAME#*.}" == "pdf" ]; then cat > /home/users/name/home/$(date +%Y%m%d)_\$FILENAME; fi" # Forward not set # Vacation Message not set ./Maildir/ This works for a

Why is the docx2pdf module not converting docx to pdf in my Python script Mac OS?

我的梦境 提交于 2020-07-10 10:27:16
问题 I'm using Python 3.8 and docx2pdf 0.1.7. I've been trying for ages to get something something in my script which will convert a docx to a pdf. I've tried all sorts of stuff but nothing has worked for me thus far. There's a module called docx2pdf which should convert the file I just created but it doesn't seem to work and I can't figure out why that's the case. I tried running it in my script but I also tried running it as a subprocess but neither worked. Documentation of the module is here. I