ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* extracting pages using luacode
@ 2020-04-25 14:17 Floris van Manen
  2020-04-25 14:56 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Floris van Manen @ 2020-04-25 14:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

I'm trying to extract pages from an existing pdf using lua.
But this approach to extract pages 11 and 30 does not work:

\starttext
\startluacode
for i, blz in ipairs({11, 30}) do
  context.startTEXpage()
  context.externalfigure("my_pdf.pdf", page=blz)
  context.stopTEXpage()
end
\stopluacode
\stoptext


Where am I missing the point?

.F

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 2456 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: extracting pages using luacode
  2020-04-25 14:17 extracting pages using luacode Floris van Manen
@ 2020-04-25 14:56 ` Hans Hagen
  2020-04-25 15:11   ` Floris van Manen
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2020-04-25 14:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Floris van Manen

On 4/25/2020 4:17 PM, Floris van Manen wrote:
> I'm trying to extract pages from an existing pdf using lua.
> But this approach to extract pages 11 and 30 does not work:
> 
> \starttext
> \startluacode
> for i, blz in ipairs({11, 30}) do
>    context.startTEXpage()
>    context.externalfigure("my_pdf.pdf", page=blz)
>    context.stopTEXpage()
> end
> \stopluacode
> \stoptext
> 
> 
> Where am I missing the point?
the syntax ...

     context.externalfigure( { "my_pdf.pdf" }, { page = blz } )


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: extracting pages using luacode
  2020-04-25 14:56 ` Hans Hagen
@ 2020-04-25 15:11   ` Floris van Manen
  0 siblings, 0 replies; 3+ messages in thread
From: Floris van Manen @ 2020-04-25 15:11 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]



On 25-04-2020 16:56, Hans Hagen wrote:
>>
>> Where am I missing the point?
> the syntax ...
> 
>     context.externalfigure( { "my_pdf.pdf" }, { page = blz } )

so simple :-)

Thanks!

.F

[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 2456 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-25 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 14:17 extracting pages using luacode Floris van Manen
2020-04-25 14:56 ` Hans Hagen
2020-04-25 15:11   ` Floris van Manen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).