sumatrapdf | GPLv3 license , with some code under BSD license
kandi X-RAY | sumatrapdf Summary
kandi X-RAY | sumatrapdf Summary
SumatraPDF is a multi-format (PDF, EPUB, MOBI, FB2, CHM, XPS, DjVu) reader for Windows under (A)GPLv3 license, with some code under BSD license (see AUTHORS). To compile you need Visual Studio 2019 16.6 or later. Free Community edition works. Open vs2019/SumatraPDF.sln and hit F5 to compile and run. For best results use the latest release available as that's what I use and test with. If things don't compile, first make sure you're using the latest version of Visual Studio.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sumatrapdf
sumatrapdf Key Features
sumatrapdf Examples and Code Snippets
Community Discussions
Trending Discussions on sumatrapdf
QUESTION
I'm trying to create a PDF file containing a monochrome 1-bit image, but configure the image to be transparent where it contains white pixels (so that content under the image is visible). The image uses the DeviceGray
color space, and BitsPerComponent
is 1.
I'm using the Mask
entry with an array specifying the color range which should be masked. My copy of the PDF spec calls this "Colour Key Masking". Since the image is bitonal, this color range is just [1 1]
(white).
However, I simply can't get this to work. The content under the image never displays. I've tried tweaking the range values, changing the image filter, tweaking the surrounding graphics state -- all to no avail.
The only thing that has worked has been to change the image color space from DeviceGray
to DeviceRGB
and tweak the Mask
ranges accordingly, but that would increase the size of these images in the PDF file, which I cannot do.
What is the correct way to use color key masking on bitonal DeviceGray
images?
Here's the image that I think should work, but does not:
...ANSWER
Answered 2022-Jan-27 at 11:20Without seeing the entire file I cannot say why the mask is not applied.
But the file below shows that the /Mask is applied to /DeviceGray bitonal images:
QUESTION
After some initial problems I was finally able to set up a self-hosted GitLab Runner on my personal laptop.
I'm now looking into how this runner works and how I can tweak it's environment to my needs. I modified the YML file to run a simple command echoing the PATH
environment variable:
ANSWER
Answered 2021-Dec-30 at 16:53There's a few reasons why environment variables may be different. Chiefly:
- The user account being used by the runner
- The powershell profile you're using locally (which will not be used by the runner)
- Any changes to environment variables made in the runner's config.toml
- environment variables changed/added through CI/CD variables.
The effective PATH
is a combination of both the system environment variables as well as user environment variables. For your runner to reflect the same environment variables that you see locally when running powershell, you must use the same user account, otherwise user environment variables you're seeing may be missing/different based on the user account.
One way to fix differences that may be caused by the user would be to change the user used by the gitlab service
To change the user used by the GitLab runner, go to services -> gitlab-runner -> (right-click) properties -> Log On tab and choose the account the runner should use.
Alternatively, specify this when installing the runner:
QUESTION
I followed this procedure in order to permanently add a path to SumatraPDF using powershell. The last few commands from the link are meant to check that the path has indeed been added.
When I access the path using the following command,
...ANSWER
Answered 2021-Sep-18 at 16:59Use setx to permanently update an environment variable. Don't hack the registry.
After you invoke setx, just update the Path environment manually in the current session. Powershell: Reload the path in PowerShell
QUESTION
I have several python executables available from within a default powershell prompt as shown by where.exe python
:
ANSWER
Answered 2021-Oct-23 at 21:36What Windows will execute is not trivial, since it might depend on the API used.
One of them is CreateProcessW:
- The directory from which the application loaded.
- The current directory for the parent process.
- The 32-bit Windows system directory. Use the GetSystemDirectory function to get the path of this directory.
- The 16-bit Windows system directory. There is no function that obtains the path of this directory, but it is searched. The name of this directory is System.
- The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
- The directories that are listed in the PATH environment variable. Note that this function does not search the per-application path specified by the App Paths registry key. To include this per-application path in the search sequence, use the ShellExecute function.
Since Windows Vista, the environment variable %NoDefaultCurrentDirectoryInExePath% configures whether or not the current directory should be searched (Source: MSDN).
Also: if you just run python
without an extension, the environment variable %PathExt% is used to find executable extensions. (Source: MSDN).
The default value for the PATHEXT variable is: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
A great tool for troubleshooting such issues is SysInternals Process Monitor. Set a filter for "path contains python" (not python.exe) and you'll see the exact search order. It will report "NO SUCH FILE" for directories which do not contain a Python executable.
Also note: the search order for DLLs may be different.
QUESTION
I'm using kable to produce tables for an Rmarkdown PDF document. I want to highlight certain cells based on their value, and every other row has a stripe. The image below shows this, as well as the issue I'm having (taken from my Adobe PDF reader). As you can see, the highlight color in the middle row (for Chinstrap penguins) is not quite even with the other two. This is a small issue but is enough to make the table look a bit janky, so I'm hoping someone can help me find a fix, or at least explain the cause.
What's odd is that this issue seems to depend on which PDF reader I view the document in. The initial image came from Adobe, but when I open the file in SumatraPDF (the default viewer that my RStudio knits to) the highlighting is consistent for all rows (see next image). This behavior doesn't seem to depend on zoom level in the PDF viewer, but could be related to another setting I'm not aware of.
The issue itself seems to be caused by the light blue striping rather than the highlight itself, because when I remove the striping all three highlights are even in both PDF viewers. This behavior can also be demonstrated without the extra highlighting by instead adding cell borders to the table using column_spec(c(2:3), width = "2.1cm", border_right = T)
as shown in the final image. In two of three rows, the 2nd column's right border is covered up by the striping (this also happens with the built-in striping feature in kableExtra). One interesting thing to note here is that this does seem to depend on PDF viewer zoom level. The image below came from Adobe at my default view (75.5), but when I change the zoom to between 100 and 200 all cell borders are correct, and then disappear again after that. My code is below, thanks for your help!
Reproducible Example
...ANSWER
Answered 2021-Sep-26 at 09:35Rendering a pdf_document
relies on generating intermediate latex
code, which gets processed in your latex interpreter to build a document. For any issue with your pdf document, I can recommend looking at the underlying latex code (by adding
keep_tex
as output argument.
In your case, table code is generated, with the following lines:
QUESTION
I'm trying to use Sumatra pdf to send a pdf to the label printer using python script. Unfortunately, it looks like the double quote ('-print-settings "landscape,1,5x"') specifying the number of copies and orientation is not passed on correctly.
...ANSWER
Answered 2021-Jun-09 at 08:44Normally you should put it as two separated elements on list '-print-settings'
and '"landscape,1,5x"'
QUESTION
Consider the following PostScript file
...ANSWER
Answered 2021-Jan-27 at 09:57In my opinion Adobe Acrobat is right but the specification could be read differently, too.
Your PDF contains the following content stream:
QUESTION
I am using Sublime3 under Windows 10.
I have deviced a pandoc build system to convert markdown files to pdf:
...ANSWER
Answered 2021-Jan-11 at 15:17As it turned out I was having big issued with command prompt, I had to restore my win10 users' settings to make everything work again.
However, since sublime text 3 uses cmd.exe to run its build systems, I came out with a workaround. The following line did the job even with a compromised cmd
QUESTION
I have a folder with multiple PDFs I need to print to different printers. I've created variables for each shared printer and depending on the first 2 letters of the PDF the printing will go to the matching printer.
I'm having trouble concatenating 2 strings to form an existing variable to use it later in the printing call.
This is what I have now (all PDFs in the dir starts with 01 for now):
...ANSWER
Answered 2020-Aug-20 at 18:22concatenating 2 strings to form an existing variable
That won't work in PowerShell, variable tokens are always treated literally.
I'd suggest you use a hashtable instead:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sumatrapdf
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page