-
Notifications
You must be signed in to change notification settings - Fork 499
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
image in PDF #369
Comments
You need to pass the allow-uri-read attribute to the command:
This is required anytime you are reading content from a URI. |
it doesn't work... ping@ubuntu47-3:~$ asciidoctor -r asciidoctor-pdf -b pdf -a allow-uri-read ping@ubuntu47-3:$ cd /tmp/ ping@ubuntu47-3:/tmp$ ls file563qKX file9csAsb fileGzYtkk filemVHKeu fileX12pDi tmux-1000 v7Lglu4 vD9dz6X vFVdRUw vpc5VaP vs3J7EU file8W5Xgz fileBKU75H fileJVQOgr fileTgwavx orbit-ping v2woOA0 va6OG4l vduR3Wi vhE6qo0 vpMXHkX xsession-ping On Wed, Dec 9, 2015 at 11:31 PM, Dan Allen notifications@github.com wrote:
|
This happens because you are using Ruby 1.9. Please use Ruby 2 or above. I'll try to fix it for Ruby 1.9, but it's really not a supported version. |
Ruby 1.9 will sometimes delete a tmp file sooner than when the process exits. I've added a guard for this. |
resolves #369 don't fail to delete tmp file
hi Dan: I just installed ruby via this steps: https://gorails.com/setup/ubuntu/14.04
but still I got errors below:
it just looks like ruby was installed by not recognized by thanks. |
Please use rvm. Honestly, rvm is the only reasonable way to use Ruby in a reliable way in my opinion. Once you switch to rvm, I swear you'll never have problems using Ruby again. (except install asciidoctor-pdf instead of rails). |
thanks Dan. everything looks great until I got this: Parsing documentation for mime-types-2.99 then I got stuck in here, waited for 20+ minutes and still pending in On Thu, Dec 10, 2015 at 9:57 PM, Dan Allen notifications@github.com wrote:
|
please ignore, everything works as you said, On Thu, Dec 10, 2015 at 10:26 PM, ping song songpingemail@gmail.com wrote:
|
Great! In case it wasn't clear for anyone following along, skip this step:
and replace it with
Also, for my general purpose gemset (when I'm not in a particular project), I like to use the name "runtime". You can combine the
(of course, replace "2.2" with whatever Ruby you install). |
thanks Dan. On Thu, Dec 10, 2015 at 11:24 PM, Dan Allen notifications@github.com
|
We already have a page on asciidoctor.org planned. It's the same for every gem in the ecosystem, so it's better to centralize the instructions and link to it. See asciidoctor/asciidoctor.org#399. |
Dan: I ran into another issue today, this looks related to a system reboot. ping@ubuntu47-3: ping@ubuntu47-3:$ I did some research and couldn't find a match. any advice? |
please ignore...I just reinstall asciidoctor and asciidoctor-pdf from gem regards On Sat, Dec 12, 2015 at 12:56 PM, ping song songpingemail@gmail.com wrote:
|
If you are using RVM, you have to remember to run As you get used to RVM, you should always check which version you are using by running:
If it says "system", you aren't using RVM. |
thanks Dan. On Sat, Dec 12, 2015 at 2:12 PM, Dan Allen notifications@github.com wrote:
|
Dan: I'm working with vim and I have some keybindings in there. so e.g whenever now the asciidoctor command from vim is still working, but I want to change previously everything works. but tonight I found the method1 works and method2 broke, again. and I run ping@ubuntu47-3: ping@ubuntu47-3:$ ping@ubuntu47-3: Fetching: asciidoctor-1.5.3.gem (100%) Successfully installed asciidoctor-1.5.3 Parsing documentation for asciidoctor-1.5.3 Installing ri documentation for asciidoctor-1.5.3 Done installing documentation for asciidoctor after 7 seconds 1 gem installed ping@ubuntu47-3: ping@ubuntu47-3: ping@ubuntu47-3: ping@ubuntu47-3:~$ rvm current ping@ubuntu47-3:~$ rvm use same thing goes asciidoctor-pdf: ping@ubuntu47-3:~$ asciidoctor -r asciidoctor-pdf -b pdf -a allow-uri-read I'm sure reinstall asciidoctor-pdf gem will be it, but just wondering what b.t.w I'm running ssh and GNU screen, then tmux on screen. I On Sat, Dec 12, 2015 at 10:51 PM, ping song songpingemail@gmail.com wrote:
|
I can still reproduce this with alpha.13:
|
Doh! It looks like I forgot to apply the fix for inline images. I just committed a fix for it to master. |
@istvanrath I'm curious, can you tell me which version of Ruby you are using. Just run |
|
We're using the exact same version of Ruby. That's very strange. Perhaps it has to do with how Ruby is packaged (and somehow the behavior of tempfile is different). How is Ruby installed on your machine? |
Also, if you remove the line that throws the error, does the image appear in your document? |
I'm not using rvm, if that's the question. This is a large document with several images, and I'm only having trouble with the ones that are pulled in via remote URIs. |
Yes, I can tell you are not using RVM. I'm just interested to know which distribution of Ruby you are using and on what platform. It's not irregular for packagers to slightly change the behavior of a program in the process of packaging it. I've seen it before. I'd just like to understand which installation might be doing that (so I know what I have to consider when developing). |
I'm using Ruby on Ubuntu 16.04 LTS. It was installed via apt-get. |
Thanks! That should help me study why we're getting different behaviors. Regardless, I still put the safeguard in place. |
whenever I run
I got this:
this is same with or without
it looks this is related to the image that I wanted to insert into PDF
this image insertion has no issue in HTML rendering, how to make it work in PDF?
The text was updated successfully, but these errors were encountered: